Part Number Hot Search : 
CSS1013S S3280 5253B EVICE 2SC4764 R5S76730 LSZ51C RL206GPT
Product Description
Full Text Search
 

To Download MCP25020ISL Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  ? 2007 microchip technology inc. ds21664d-page 1 mcp2502x/5x features ? implements can v2.0b - programmable bit rate up to 1 mb/s - one programmable mask - two programmable filters - three auto-transmit buffers - two message reception buffers - does not require synchronization or configuration messages ? hardware features - non-volatile memory for user configuration - user configuration automatically loaded on power-up - eight general-purpose i/o lines individually selectable as inputs or outputs - individually selectable transmit-on-pin- change for each input - four 10-bit, analog input channels with programmable conversion clock and v ref sources (mcp2505x devices only) - message scheduling capability - two 10-bit pwm outputs with independently programmable frequencies - device configuration can be modified via can bus messages - in-circuit serial programming? (icsp?) of default configuration memory - optional 1-wire can bus operation ? low-power cmos technology - operates from 2.7v to 5.5v - 10 ma active current, typical - 30 a standby current (can sleep mode) ? 14-pin pdip (300 mil) and soic (150 mil) packages ? available temperature ranges: - industrial (i): -40c to +85c - extended (e): -40c to +125c description the mcp2502x/5x devices operate as i/o expanders for a controller area network (can) system, supporting can v2.0b active, with bus rates up to 1 mb/s. the mcp2502x/5x allows a simple can node to be implemented without the need for a microcontroller. the devices are identical, with the following exceptions: the mcp2502x/5x devices feature a number of peripherals, including digital i/os, four-channel 10-bit a/d (mcp2505x) and pwm outputs with automatic message transmission on change-of-input state. this includes an analog input exceeding a preset threshold. one mask and two acceptance filters are provided to give maximum flexibility during system design with respect to identifiers that the device will respond to. the device can also be configured to automatically transmit a unique message whenever any of several error conditions occur. the device is pre-programmed in non-volatile memory so that the part defaults to a specific configuration at power-up. device a/d one wire digital canbus mcp25020 no no mcp25025 no yes mcp25050 yes no mcp25055 yes yes can i/o expander family
mcp2502x/5x ds21664d-page 2 ? 2007 microchip technology inc. package types definition of terms the following terms are used throughout this document: i/o expander - refers to the integrated circuit (ic) device being described (mcp2502x/5x). input message - term given to messages that are received by the mcp2502x/5x and cause the internal registers to be modified. once the register modification has been performed, the mcp2502x/5x transmits a command acknowledge message to indicate that the command was received and processed. command acknowledge message - term given to the message that is automatically transmitted by the mcp2502x/5x after receiving and processing an input message. information request message - term given to remote request messages that are received by the mcp2502x/5x that subsequently generate an output message (data frame) in response. output message - term given to the message that the mcp2502x/5x sends in response to an information request message. on bus message - term given to the message that the mcp2502x/5x transmits after completing the power-on/ self-configuration sequence at timed intervals, if enabled. self-configuration - term used to describe the process of transferring the contents of the eprom memory array to the sram memory array. on bus - term used to describe the condition when the mcp2502x/5x is fully-configured and ready to transmit, or receive, on the bus. this is the only state in which the mcp2502x/5x can transmit on the bus. edge detection - refers to the mcp2502x/5x?s ability to automatically transmit a message based upon the occurance of a predefined edge on any digital input. threshold detection - refers to the mcp2502x/5x?s ability to automatically transmit a message when a predefined analog threshold is reached. gp0/an0 gp1/an1 v dd txcan/txrxcan * rxcan/nc * gp5/v ref + 1 2 3 4 gp4/v ref - gp6/clkout 14 13 12 11 10 gp3/an3/pwm2 osc1/clkin gp2/an2/pwm1 5 6 7 8 9 osc2 v ss gp7/rst /v pp pdip/soic * one-wire option available on mcp250x5 devices.
? 2007 microchip technology inc. ds21664d-page 3 mcp2502x/5x 1.0 device overview this document contains device-specific information on the mcp2502x/5x family of can i/o expanders. the can protocol is not discussed in depth in this document. additional information on the can protocol can be found in the can specification, as defined by robert bosch gmbh. figure 1-1 is the block diagram of the mcp2502x/5x and table 1-1 is the pinout description. the following sections detail the modules as listed in figure 1-1. figure 1-1: mcp2502x/5x block diagram table 1-1: pinout description gpio gp4/v ref - gp3/an3/pwm2 gp2/an2/pwm1 gp1/an1 gp0/an0 gp5/v ref + gp6/clkout gp7rst/v pp user timing generation osc1/clkin osc2/clkout can protocol engine rxcan txcan/ a/d pwm1 pwm2 memory * txrxcan * only the mcp2505x devices have the a/d module. state machine and control logic pin name pin number standard function alternate function programming mode function gp0/an0 * 1 bidirectional i/o pin, ttl input buffer analog input channel none gp1/an1 * 2 bidirectional i/o pin, ttl input buffer analog input channel none gp2/an2/pwm2 * 3 bidirectional i/o pin, ttl input buffer analog input/pwm output none gp3/an3/pwm3 * 4 bidirectional i/o pin, ttl input buffer analog input/pwm output none gp4/v ref - 5 bidirectional i/o pin, ttl input buffer external v ref -data gp5/v ref + 6 bidirectional i/o pin, ttl input buffer external v ref input clock v ss 7 ground none ground osc1/clkin 8 external oscillator input external clock input none osc2 9 external oscillator output none none gp6/clkout 10 bidirectional i/o pin, ttl input buffer clkout output none gp7/rst /v pp 11 input pin, ttl input buffer external reset input vpp rxcan 12 can data receive input not connected for 1-wire none txcan/txrxcan 13 can data transmi t output can tx and rx for 1-wire operation (mcp250x5) none v dd 14 power none power * only the mcp2505x devices have the a/d module.
mcp2502x/5x ds21664d-page 4 ? 2007 microchip technology inc. notes:
? 2007 microchip technology inc. ds21664d-page 5 mcp2502x/5x 2.0 can module the can module is a protocol controller that converts between raw digital data and can message packets. the main functional block of the can module is shown in figure 2-1 and consists of: ? can protocol engine ? buffers, masks and filters the module features include: ? implementation of the can protocol ? double-buffered receiver with two separate receive buffers ? one full-acceptance mask (standard and extended) ? two full-acceptance filters (standard and extended) ? one filter for each receive buffer ? three prioritized transmit buffers for transmitting predefined message types ? automatic wake-up on bus traffic function ? error management logic for transmit and receive error states ? low-power sleep mode figure 2-1: can module acceptance filter rxf1 r x b 1 identifier data field data field identifier m a b acceptance mask rxm acceptance filter rxf0 r x b 0 txreq txb2 abtf mloa txerr message message queue control transmit byte sequencer txreq txb0 abtf mloa txerr message crc<14:0> comparator receive<7:0> transmit<7:0> receive error transmit error protocol rec tec errpas busof f finite state machine counter counter shift<14:0> {transmit<5:0>, receive<8:0>} transmit logic bit timing logic txcan/txrxcan rxcan configuration registers clock generator protocol engine buffers txreq txb1 abtf mloa txerr message a c c e p t a c c e p t
mcp2502x/5x ds21664d-page 6 ? 2007 microchip technology inc. 2.1 can protocol finite state machine the heart of the engine is the finite state machine (fsm). this state machine sequences through messages on a bit-by-bit basis, changing states as the fields of the various frame types are transmitted or received. the fsm is a sequencer controlling the sequential data stream between the tx/rx shift register, the crc register and the bus line. the fsm also controls the error management logic (eml) and the parallel data stream between the tx/rx shift registers and the buffers. the fsm insures that the pro- cesses of reception, arbitration, transmission and error signaling are performed according to the can protocol. the automatic retransmission of messages on the bus line is also handled. 2.2 cyclic redundancy check (crc) the cyclic redundancy check register generates the cyclic redundancy check (crc) code that is transmitted after either the control field (for messages with 0 data bytes) or the data field and is used to check the crc field of incoming messages. 2.3 error management logic the error management logic is responsible for the fault confinement of the can device. its two counters (the receive error counter (rec) and the transmit error counter (tec)) are incremented and decremented by commands from the bit stream processor. according to the values of the error counters, the mcp2502x/5x is set into the states error-active, error-passive or bus-off. error-active: both error counters are below the error- passive limit of 128. error-passive: at least one of the error counters (tec or rec) equals or exceeds 128. bus-off: the transmit error counter (tec) equals or exceeds the bus-off limit of 256. the device remains in this state until the bus-off recovery sequence is received. the bus-off recovery sequence consists of 128 occurrences of 11 consecutive recessive bits. figure 2-2: error modes state diagram note: the mcp2502x/5x, after going bus-off, will recover back to error-active automatically if the bus remains idle for 128 x 11 bits. optreg2.erre must be set to force the mcp2502x/5x to enter listen-only mode instead of normal mode during bus recovery. the current error mode (except for bus-off) of the mcp2502x/5x can be determined by reading the eflg register via the read can error message. bus-off error-active error-passive rec < 127 or tec < 127 rec > 127 or tec > 127 tec > 255 reset 128 occurrences of 11 consecutive ?recessive? bits
? 2007 microchip technology inc. ds21664d-page 7 mcp2502x/5x register 2-1: tec - transmitter error counter register 2-2: rec - receiver error counter figure 2-3: bit time partitioning 2.4 bit timing logic the bit timing logic (btl) monitors the bus line input and handles the bus-related bit timing based on the can protocol. the btl synchronizes on a recessive- to-dominant bus transition at start-of-frame (hard synchronization) and on any further recessive-to- dominant bus line transition if the can controller itself does not transmit a dominant bit (resynchronization). the btl also provides programmable time segments to compensate for the propagation delay time, phase shifts and to define the position of the sample point within the bit time. these programmable segments are made up of integer units called time quanta (t q ). the nominal bit time is calculated by programming the t q length and the number of t q in each time segment, as discussed below. 2.4.1 time quantum ( t q ) time quantum is a fixed unit of time derived from the oscillator period. there is a programmable baud rate prescaler (brp) (with integral values ranging from 1 to 64) as well as a fixed division by two for clock generation. r-0 r-0 r-0 r-0 r-0 r-0 r-0 r-0 tec7 tec6 tec5 tec4 tec3 tec2 tec1 tec0 bit 7 bit 0 bit 7-0 tec7:tec0: transmit error counter bits legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? - n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown r-0 r-0 r-0 r-0 r-0 r-0 r-0 r-0 rec7 rec6 rec5 rec4 rec3 rec2 rec1 rec0 bit 7 bit 0 bit 7-0 rec7:rec0: receive error counter bits legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? - n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown input signal sync prop segment phase segment 1 phase segment 2 sample point t q
mcp2502x/5x ds21664d-page 8 ? 2007 microchip technology inc. the base t q is defined as twice the oscillator period. adding the brp into the equation yields: by definition, the nominal bit time is programmable from a minimum of 8 t q to 25 t q . also, the minimum nominal bit time is 1 s, which corresponds to 1 mb/s. 2.4.2 time segments time segments make up the nominal bit time. the nominal bit time can be thought of as being divided into separate non-overlapping time segments. these segments are shown in figure 2-3. ? synchronization segment (syncseg) ? propagation segment (propseg) ? phase buffer segment 1 (ps1) ? phase buffer segment 2 (ps2) rules for programming the segments there are a few rules to follow when programming the time segments: ? propseg + ps1 ps2 ? ps2 > sync jump width ? ps2 information processing time 2.4.2.1 synchronization segment this part of the bit time is used to synchronize the various can nodes on the bus. the edge of the input signal is expected to occur during the syncseg. the duration is fixed at 1 t q . 2.4.2.2 propagation segment this part of the bit time is used to compensate for physical delay times within the network. these delay times consist of the signal propagation time on the bus line and the internal delay time of the nodes. the delay is calculated as being the round-trip time from transmitter to receiver (twice the signal's propagation time on the bus line), the input comparator delay and the output driver delay. the length of the propagation segment can be programmed from 1 t q to 8 t q by setting the prseg2:prseg0 bits of the cnf2 register. 2.4.2.3 phase buffer segments the phase buffer segments are used to optimally locate the sampling point of the received bit within the nominal bit time. the sampling point occurs between ps1 and ps2. these segments can be automatically lengthened or shortened by the resynchronization process. thus, the variation of the values of the phase buffer segments represent the dpll functionality. phase segment 1 (ps1): the end of ps1 determines the sampling point within a bit time. ps1 is programma- ble from 1 t q - 8 t q in duration. phase segment 2 (ps2): ps2 provides delay before the next transmitted data transition and is also pro- grammable from 1 t q - 8 t q in duration. however, due to ipt requirements, the actual minimum length of phase segment 2 is 2 t q . it may also be defined to be equal to the greater of ps1 or the information process- ing time (ipt). 2.4.3 sample point the sample point is the point of time at which the bus level is read and the value of the received bit is determined. the sampling point occurs at the end of ps1. if desired, it is possible to specify multiple sampling of the bus line at the sample point. the value of the received bit is determined to be the value of the majority decision of three values. the three samples are taken at the sample point, and twice before, with a time of t q /2 between each sample. 2.4.4 information processing time the information processing time (ipt) is the time segment (starting at the sample point) that is reserved for calculation of the subsequent bit level. the can specification defines this time to be less than or equal to 2 t q . the mcp2502x/5x defines this time to be 2t q . thus, ps2 must be at least 2 t q long. 2.4.5 synchronization jump width to compensate for phase shifts and oscillator tolerances between the nodes in the system, each can controller must be able to synchronize to the relevant signal edge of the incoming signal. when a recessive-to-dominant edge in the transmitted data is detected, the logic will compare the location of the edge to the expected time (syncseg). the circuit will then adjust the values of ps1 and ps2, as necessary, using the programmed synchronization jump width (sjw). this adjustment is made for resynchronization during a message and not hard synchronization, which occurs only at the message start-of-frame (sof). t q 2* t osc * brp 1 + () = where brp = binary value represented by cnf1.brp<5:0> nominal bit time t q * sync_seg propseg phase_seg1 phase_seg2 + ++ ( ) =
? 2007 microchip technology inc. ds21664d-page 9 mcp2502x/5x as a result of resynchronization, ps1 may be lengthened or ps2 may be shortened. the amount of lengthening or shortening of the phase buffer segments has an upper-bound given by the sjw. the sjw is programmable between 1 t q and 4 t q . the value of the sjw will be added to ps1 (or subtracted from ps2) depending on the phase error (e) of the edge in relation to the receiver?s syncseg. the phase error is defined as follows: ? e = 0 if the edge lies within synceseg - no resynchronization is required. ? e > 0 if the edge lies before the sample point - ps1 will be lengthened by the amount of the sjw. ? e < 0 if the edge lies after the sample point of the previous bit and before the syncseg of the current bit - ps2 will be shortened by the amount of the sjw. 2.4.6 configuration registers there are three registers (in the configuration register module) associated with the can bit timing logic that controls the bit timing for the can bus interface. 2.4.6.1 cnf1 the brp<5:0> bits control the baud rate prescaler. these bits set the length of t q relative to the osc1 input frequency, with the minimum length of t q being 2t osc in length (when brp<5:0> are set to 000000 ). the sjw<1:0> bits select the synchronization jump width in terms of number of t q ?s. 2.4.6.2 cnf2 the prseg<2:0> bits set the length (in t q ?s) of the propagation segment. the ps1<2:0> bits set the length (in t q ?s) of phase segment 1. the sam bit controls how many times the rxcan pin is sampled. setting this bit to a ? 1 ? causes the bus to be sampled three times. twice at t q /2 before the sample point and once at the normal sample point (which is at the end of ps1). the value of the bus is determined to be the value read during at least two of the samples. if the sam bit is set to a ?0?, the rxcan pin is sampled only once at the sample point. the btlmode bit controls how the length of ps2 is determined. if this bit is set to a ? 1 ?, the length of ps2 is determined by the ps2<2:0> bits of cnf3. if the btlmode bit is set to a ?0? then the length of ps2 is the greater of ps1 and the information processing time (which is fixed at 2 t q for the mcp2502x/5x). 2.4.6.3 cnf3 the ps2<2:0> bits set the length, in t q ?s, of ps2, if the cnf2.btlmode bit is set to a ? 1 ?. if the btlmode bit is set to a ?0?, the ps2<2:0> bits have no effect. additionally, the wake-up filter (cnf3.wakfil) is implemented in the cnf3 register. this filter is a low- pass filter that can be used to prevent the mcp2502x/ 5x from waking up due to short glitches on the can bus. register 2-3: cnf1 - can configuratio n register 1 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 sjw1 sjw0 brp5 brp4 brp3 brp2 brp1 brp0 bit 7 bit 0 bit 7-6 sjw1:sjw0: synchronized jump width bits 11 = length = 4 x t q 10 = length = 3 x t q 01 = length = 2 x t q 00 = length = 1 x t q bit 5-0 brp5:brp0: baud rate prescaler bits 111111 = t q = 2 x 64 x 1/f osc - - 000000 = t q = 2 x 1 x 1/f osc legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? - n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown
mcp2502x/5x ds21664d-page 10 ? 2007 microchip technology inc. register 2-4: cnf2 - can configuration register 2 register 2-5: cnf3 - can configuration register 3 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 btlmode sam phseg12 phseg11 ph seg10 prseg2 prseg1 prseg0 bit 7 bit 0 bit 7 btl mode: length determination of phseg2 bit 1 = length of phase_seg2 determined by bits 2:0 of cnf3 0 = length of phase_seg2 is the greater of phase_seg1 or ipt(2tq) bit 6 sam: sample of the can bus line bit 1 = bus line is sampled three times at the sample point 0 = bus line is sampled once at the sample point bit 5-3 phseg12:phseg10: phase buffer segment1 bits 111 = length = 8 x t q - - - 000 = length = 1 x t q bit 2-0 prseg2:prseg0 : propagation time segment bits 111 = length = 8 x t q - - - 000 = length = 1 x t legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? - n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown u-0 r/w-0 u-0 u-0 u-0 r/w-0 r/w-0 r/w-0 ? wakfil ? ? ? phseg22 ph seg21 phseg20 bit 7 bit 0 bit 7 unimplemented: (reads as 0) bit 6 wakfil: wake-up filter bit 1 = wake-up filter enabled 0 = wake-up filter disabled bit 5-3 unimplemented: (reads as 0) bit 2-0 phseg22:phseg20: phase buffer segment2 bits 111 = length = 8 x t q - - - 001 = length = 2 x t q 000 = invalid legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? - n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown
? 2007 microchip technology inc. ds21664d-page 11 mcp2502x/5x 2.5 buffers, masks, and filters this part of the can module supports the transmitting, receiving and acceptance of can messages. three transmit buffers are used for the three transmit message ids, as discussed later in this section. two receive buffers store the can message?s arbitration field, control field and the data field. one mask defines which bits are to be applied to either filter. the mask can be regarded as defining ?don?t care? bits for the filter. each of the two filters define a bit pattern that will be compared to all incoming messages. all filter bits that have not been defined as ?don?t care? by the mask are applied to the message. 2.5.1 transmit message id?s the mcp2502x/5x device contains three separate transmit message id?s: txid0, txid1 and txid2. the data length code is predefined for each of the various output messages, with the data that is transmitted coming directly from the contents of the device?s peripheral registers. 2.5.1.1 transmit message id0 (txid0) txid0 contains the identifier that is used when trans- mitting the on bus message. if enabled (stcon.sten = 1 ), the on bus message will be transmitted at predefined intervals. depending on the message-select bit (stcon.stms = 1 ), the can message will send gpio and a/d data. transmit message id0 will not automatically be sent when the device is brought out of sleep. 2.5.1.2 transmit message id1 (txid1) txid1 contains the identifier that is used when the mcp2502x/5x sends the command acknowledge message, the receive overflow message and/or the error condition message. all message types use the same identifier. the caen bit, in the optreg2 register, selects between the command acknowledge and receive overflow operation. these message types have a dlc of 0 and do not contain any data. the error condition message can occur anytime, has a dlc of 3 and contains the eflg, tec and rec data values. command acknowledge : txid1 sends a command acknowledge message when the mcp2502x/5x receives an input message and processes the instruction (and optreg2.caen = 1 ). this message is used as a hand shake for the node requesting the modification of the mcp2502x/5x. there is no data associated with this message. receive overflow : txid1 sends a receive overflow message if there is a receive overflow condition (and optreg2.caen = 0 ). this only occurs if the device has received a valid message before processing the previous valid message from the same receive buffer. there is no data associated with this message. error condition : an error condition message is transmitted if the tec or rec counters reach error warning (> 95) or error passive (> 127). this message contains the txid1 identifier and the tec, rec and eflg counters. a hysteresis is implemented in hardware that prevents messages from repeatedly being transmitted due to error counts changing by one or two bits. once a message is sent for an error warning (tec or rec > 95), the message will not trigger again until the error counter 79 and back to > 95 (hysteresis = 17 counts). similarly, an error passive message is sent at tec or rec > 127 and is not sent again until the error counter 111 and back to >127 (hysteresis = 17 counts). 2.5.1.3 transmit message id2 (txid2) transmit id2 contains the identifier that is used when transmitting auto-conversion-initiated messages, including digital input edge detection and/or analog input exceeding a threshold. this message will also be sent when the device wakes up from sleep due to a digital input change-of-state condition (i.e., change-of- state occurs on input configured to transmit on change-of-state). 2.6 receive buffers the mcp2505x contains two receive buffers, each with their own filter. there is also a message assembly buffer (mab) that acts as a third receive buffer (see figure 2-1). the two receive buffers, combined with the mab help, insure that received messages will be processed while minimizing the chances of receive buffer overrun due to maximum bus loading of messages destined for the mcp2502x/5x. note: a zero data length on bus message will be transmitted once after power-up, regardless of scheduled transmission- enable status. note: the receive buffers are used by the mcp2502x/5x to implement the command messages and are not externally accessible.
mcp2502x/5x ds21664d-page 12 ? 2007 microchip technology inc. 2.7 acceptance mask the acceptance mask is used to define which bits in the can id are to be compared against the programmable filters. individual bits within the mask correspond to bits in the can id that, in turn, correspond to bits in the acceptance filters. any bit in the mask that is set to a ? 1 ? will cause the corresponding can id bit to be compared against the associated filter bit. any bit in the mask that is set to a ? 0 ? is not compared and effectively sets the associated can id bit to ?don?t care?. 2.7.1 masks and standard/ extended ids to insure proper operation of the information request and input messages, some mask bits (as configured in the mask registers) may be ignored as explained: message with a standard id - the three least significant bits of a standard identifier (rxmsidl.sid2:sid0) are ?don?t care? for the mask registers and effectively become ? 0 ?. message with an extended id - the three least significant bits of the standard identifier (rxmsidl.sid2:sid0) are configurable and the three least significant bits of the extended identifier (rxmeid0.eid2:eid0) are always ?don?t cares? and effectively becomes ? 0 ?. 2.8 acceptance filters there are two separate acceptance filters defined for the mcp2502x/5x: rxf0 and rxf1. rxf0 is used for information request messages and rxf1 is used for input messages (see table 4-2 and table 4-3). each bit in the filters corresponds to a bit in the can id. every bit in the can id, for which the corresponding mask bit is set, must match the associated filter bit in order for the message to be accepted. messages that fail to meet the mask/filter criteria are ignored. register 2-6: txidnsidh - transmit identifier n standard identifier high note: the exide bit in the mask register (rxmsidl) can be used to mask the ide bit in the corresponding receive buffer register (rxbnsidl). r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x sid10 sid9 sid8 sid7 sid6 sid5 sid4 sid3 bit 7 bit 0 bit 7-0 sid10:sid3: standard identifier bits legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? - n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown
? 2007 microchip technology inc. ds21664d-page 13 mcp2502x/5x register 2-7: txidnsidl - transmit identifier n standard identifier low register 2-8: txidneid8 - transmit identifier n extended identifier high register 2-9: txidneid0 - transmit identifier n extended identifier low r/w-x r/w-x r/w-x u-0 r/w-x u-0 r/w-x r/w-x sid2 sid1 sid0 ? exide ?eid17eid16 bit 7 bit 0 bit 7-5 sid2:sid0 : standard identifier bits bit 4 unimplemented : read as ' 0 ? bit 3 exide : extended identifier enable bit 1 = message will transmit extended identifier 0 = message will transmit standard identifier bit 2 unimplemented : read as ' 0 ? bit 1-0 eid17:eid16 : extended identifier bits legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? - n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x eid15 eid14 eid13 eid12 eid11 eid10 eid9 eid8 bit 7 bit 0 bit 7-0 eid15:eid8 : extended identifier bits legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? - n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x eid7 eid6 eid5 eid4 eid3 eid2 eid1 eid0 bit 7 bit 0 bit 7-0 eid7:eid0 : extended identifier bits legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? - n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown
mcp2502x/5x ds21664d-page 14 ? 2007 microchip technology inc. register 2-10: rxmsidh - acceptance filter mask standard identifier high register 2-11: rxmsidl - acceptance filter mask standard identifier low register 2-12: rxmeid8 - acceptance filter mask extended identifier mid r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x sid10 sid9 sid8 sid7 sid6 sid5 sid4 sid3* bit 7 bit 0 bit 7-0 sid10:sid3 : standard identifier bits * if optreg2.mtype = 1 , then sid3 is forced to zero. legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? - n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown r/w-x r/w-x r/w-x u-0 r/w-x u-0 r/w-x r/w-x sid2 sid1 sid0 ? exide ?eid17eid16 bit 7 bit 0 bit 7-5 sid2:sid0 : standard identifier bits standard messages, bits = b ? 000 ? extended messages, bits = sid2:sid0 bit 4 unimplemented: read as ' 0 ? bit 3 exide : extended identifier enable bit 1 = apply filter to rxfnsidl.exide (filter applies to standard or extended message frames depending on filter bit) 0 = do not apply filter to rxfnsidl.exide (filter will be applied to both standard and extended message frames) bit 2 unimplemented: read as ' 0 ? bit 1-0 eid17:eid16: extended identifier bits legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? - n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x eid15 eid14 eid13 eid12 eid11 eid10 eid9 eid8 bit 7 bit 0 bit 7-0 eid15:eid8 : extended identifier bits legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? - n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown
? 2007 microchip technology inc. ds21664d-page 15 mcp2502x/5x register 2-13: rxmeid0 - acceptance filter mask extended identifier low register 2-14: rxfnsidh - acceptance filter n standard identifier high register 2-15: rxfnsidl - acceptance filter n standard identifier low r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x eid7 eid6 eid5 eid4 eid3 eid2 eid1 eid0 bit 7 bit 0 bit 7-3 eid7:eid3 : extended identifier bits bit 2-0 eid2:eid0 : extended identifier bits (always reads as ? 0 ?) legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? - n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x sid10 sid9 sid8 sid7 sid6 sid5 sid4 sid3* bit 7 bit 0 bit 7-0 sid10:sid3 : standard identifier bits * if optreg2.mtype = 1 , then sid3 = x legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? - n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown r/w-x r/w-x r/w-x u-0 r/w-x u-0 r/w-x r/w-x sid2 sid1 sid0 ? exide ?eid17eid16 bit 7 bit 0 bit 7-5 sid2:sid0 : standard identifier bits 1 = when exide = 1 , sid2:sid0 = b?xxx? 0 = when exide = 0 , sid2:sid0 = as configured bit 4 unimplemented: read as ? 0 ? bit 3 exide : extended identifier enable bit 1 = filter will apply to extended identifier 0 = filter will apply to standard identifier bit 2 unimplemented: read as ? 0 ? bit 1-0 eid17:eid16 : extended identifier bits legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? - n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown
mcp2502x/5x ds21664d-page 16 ? 2007 microchip technology inc. register 2-16: rxfneid8 - acceptance filter n extended identifier mid register 2-17: rxfneid0 - acceptance filter n extended identifier low r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x eid15 eid14 eid13 eid12 eid11 eid10 eid9 eid8 bit 7 bit 0 bit 7-0 eid15:eid8 : extended identifier bit legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? - n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x eid7 eid6 eid5 eid4 eid3 eid2 eid1 eid0 bit 7 bit 0 bit 7-0 eid7:eid0 : extended identifier bit (always = b? xxx ?) legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? - n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown
? 2007 microchip technology inc. ds21664d-page 17 mcp2502x/5x register 2-18: eflg - error flag register r-0 r-0 r-0 r-0 r-0 r-0 r-0 r-0 escf rbo txbo txep rxep txwar rxwar ewarn bit 7 bit 0 bit 7 escf : error state change (for sending error state message) 1 = an error state change occurred 0 = no error state change bit 6 rbo : receive buffer overflow 1 = overflow occurred 0 = no overflow occurred bit 5 txbo : transmitter in bus off error state bit 1 = tec reaches 256 0 = indicates a successful bus recovery sequence bit 4 txep : transmitter in error passive state bit 1 = tec is equal to or greater than 128 0 = tec is less than 128 bit 3 rxep : receiver in error passive state bit 1 = rec is equal to or greater than 128 0 = rec is less than 128 bit 2 txwar : transmitter in error warning state bit 1 = tec is equal to or greater than 96 0 = tec is less than 96 bit 1 rxwar : receiver in error warning state bit 1 = rec is equal to or greater than 96 0 = rec is less than 96 bit 0 ewarn ; either the receive error counter or transmit error counter has reached or exceeded 96 errors 1 = tec or rec is equal to or greater than 96 (txwar or rxwar = 1 ) 0 = both rec and tec are less than 96 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? - n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown
mcp2502x/5x ds21664d-page 18 ? 2007 microchip technology inc. notes:
? 2007 microchip technology inc. ds21664d-page 19 mcp2502x/5x 3.0 user registers 3.1 description the mcp2502x/5x allows the user to pre-program registers pertaining to can module and device configuration into non-volatile eprom memory. in this way, the device is initialized to a default state after power-up. the user registers are transferred to sram during the power-up sequence and many of the registers are able to be accessed via the can bus once the device establishes a connection with the bus. additionally, there are 16 user-defined registers that can be used to store information about the part (e.g., serial number, node identifier, etc.). the registers are summarized in table 3-1. note 1: when transferred to ram, the register addresses are offset by 1ch. accessing individual registers using the ?write register? or ?read register command requires use of the offset address. also, see table 3-2 for information on accessible registers not contained in user eprom. 2: do not address locations outside of the user memory map or unexpected results may occur. table 3-1: user memory map address name description address name description 00h iointen enable inputs for transmit-on-change feature 1bh rxf0eid0 acceptance filter 0, extended id lsb 01h iointpo defines polarity for i/o or greater than/ less than operator for a/d transmit-on- change inputs 1ch rxf1sidh acceptance filter 1, standard id msb 02h gplat general purpose i/o (gpio) register 1dh rxf1sidl acceptance filter 1, standard id lsb, extended id usb, and extended id enable 03h 0xff reserved 1eh rxf1eid8 acceptance filter 1, extended id msb 04h optreg1 configuration options, including gpio pull-up enable, clockout enable and prescaler 1fh rxf1eid0 acceptance filter 1, extended id lsb 05h t1con pwm1 timer control register; contains enable bit, clock prescale and dc lsbs 20h txid0sidh transmit buffer 0, standard id msb 06h t2con pwm2 timer control register; contains enable bits, clock prescale and dc lsbs 21h txid0sidl transmit buffer 0, standard id lsb, extended id usb, and extended id enable 07h pr1 pwm1 period register 22h txid0eid8 transmit buffer 0, extended id msb 08h pr2 pwm2 period register 23h txid0eid0 transmit buffer 0, extended id lsb 09h pwm1dch pwm1 duty cycle (dc) msbs 24h txid1sidh transmit buffer 1, standard id msb 0ah pwm2dch pwm2 duty cycle (dc) msbs 25h txid1sidl transmit buffer 1, standard id lsb, extended id usb, and extended id enable 0bh cnf1 3 can module register configures synchronization jump width and baud rate prescaler 26h txid1eid8 transmit buffer 1, extended id msb 0ch cnf2 3 can module register configures propagation segment, phase segment 1, and determines number of sample points 27h txid1eid0 transmit buffer 1, extended id lsb 0dh cnf3 3 can module register configures phase buffer segment 2, sleep mode 28h txid2sidh transmit buffer 2, standard id msb note 1: gpddr is mapped to 1fh is sr am and not offset by 1ch. 2: user memory ( 35h-44h ) is not transferred to ram on power-up and can only be accessed via ?read user mem? commands. 3: cannot be modified from initial programmed values. 4: unimplemented on mcp 2502x devices and read 0x00 (exception, adcon1 = 0x0f ).
mcp2502x/5x ds21664d-page 20 ? 2007 microchip technology inc. 0eh adcon0 4 a/d control register; contains enable, conversion rate, channel select bits 29h txid2sidl transmit buffer 2, standard id lsb, extended id usb, and extended id enable 0fh adcon1 4 a/d control register; contains voltage reference source, conversion rate and a/d input enable bits 2ah txid2eid8 transmit buffer 2, extended id msb 10h stcon scheduled transmission control register 2bh txid2eid0 transmit buffer 2, extended id lsb 11h optreg2 configuration options, including sleep mode, rtr message and error recovery enables 2ch adcmp3h 4 analog channel 3 compare value msb 12h ? reserved 2dh adcmp3l 4 analog channel 3 compare value lsb?s 13h ? reserved 2eh adcmp2h 4 analog channel 2 compare value msb 14h rxmsidh acceptance filter mask, standard id msb 2fh adcmp2l 4 analog channel 2 compare value lsb?s 15h rxmsidl acceptance filter mask, standard id lsb and extended id usb 30h adcmp1h 4 analog channel 1 compare value msb 16h rxmeid8 acceptance filter mask, extended id msb 31h adcmp1l 4 analog channel 1 compare value lsb?s 17h rxmeid0 acceptance filter mask, extended id lsb 32h adcmp0h 4 analog channel 0 compare value msb 18h rxf0sidh acceptance filter 0, standard id msb 33h adcmp0l 4 analog channel 0 compare value lsb?s 19h rxf0sidl acceptance filter 0, standard id lsb, extended id usb, and extended id enable 34h gpddr 1 general purpose i/o data direction register 1ah rxf0eid8 acceptance filter 0, extended id msb 35-44h user[0:f] 2 user defined bytes (0-15) table 3-1: user memory map (continued) address name description address name description note 1: gpddr is mapped to 1fh is sr am and not offset by 1ch. 2: user memory ( 35h-44h ) is not transferred to ram on power-up and can only be accessed via ?read user mem? commands. 3: cannot be modified from initial programmed values. 4: unimplemented on mcp 2502x devices and read 0x00 (exception, adcon1 = 0x0f ). table 3-2: accessible ram registers not in the eprom map addr* name bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0 value on por value on rst 1fh ** gpddr ? ddr6 ddr4 ddr4 ddr3 ddr2 ddr1 ddr0 -111 1111 -111 1111 18h eflg escf rbo txep txep rxep txwar rxwar ewarn 0000 0000 0000 0000 19h tec transmit error counters 0000 0000 0000 0000 1ah rec receive error counters 0000 0000 0000 0000 50h adres3h an3.9 an3.8 an3.6 an3.6 an3.5 an3.4 an3.3 an3.2 xxxx xxxx uuuu uuuu 51h adres3l an3.1 an3.0 ? ? ? ? ? ? xx-- ---- uu-- ---- 52h adres2h an2.9 an2.8 an2.6 an2.6 an2.5 an2.4 an2.3 an2.2 xxxx xxxx uuuu uuuu 53h adres2l an2.1 an2.0 ? ? ? ? ? ? xx-- ---- uu-- ---- 54h adres1h an1.9 an1.8 an1.6 an1.6 an1.5 an1.4 an1.3 an1.2 xxxx xxxx uuuu uuuu 55h adres1l an1.1 an1.0 ? ? ? ? ? ? xx-- ---- uu-- ---- 56h adres0h an0.9 an0.8 an0.6 an0.6 an0.5 an0.4 an0.3 an0.2 xxxx xxxx uuuu uuuu 57h adres0l an0.1 an0.0 ? ? ? ? ? ? xx-- ---- uu-- ---- * these addresses are used when using the ?write register? or ?read register? command ** the gpddr register is not offset to ram the same as the other registers in the eprom
? 2007 microchip technology inc. ds21664d-page 21 mcp2502x/5x 4.0 device operation 4.1 power-up sequence the following sections describe the events/actions of the mcp2502x/5x during normal power-up and operation. 4.1.1 power-on reset the mcp2502x/5x goes through a sequence of events at power-on reset (por) in order to load the programmed configuration and insure that errors are not introduced on the bus. during this time, the device is prevented from generating a low condition on the txcan pin. the txcan pin must remain high from power-on until the device goes on bus. operational mode at power-on the mcp2502x/5x initially powers up in configuration mode. while in this mode, the mcp2502x/5x will be prevented from sending or receiving messages via the can interface. the adc and pwm peripherals are disabled while in this mode. self-configuration once the mcp2502x/5x is out of reset, it will perform a self-configuration. this is accomplished by transferring the contents of the eprom array to the corresponding locations within the sram array. in addition, the checksum of the data written to sram will be compared to a pre-programmed value as a test of valid data. going on bus once the self-configuration cycle has successfully completed, the mcp2502x/5x switches to listen-only mode. it will remain in this mode until an error-free can message is detected. this is done to ensure that the device is at the correct bus rate for the system. once the device detects an error-free message, it waits for can bus idle before switching to normal mode. this prevents it from going on bus in the middle of another node?s transmission and generating an error frame. alternately, the mcp2505x may directly enter normal mode (without first entering listen-only mode) after completing its self-configuration. this is configured by the user via a control bit (optreg2.punrm). once the mcp2502x/5x enters normal mode, it is ready to send/receive messages via the can interface. at this point the adc and pwm peripherals are operational, if enabled. scheduled transmissions once the mcp2502x/5x has gone on bus it will transmit the on bus message once, regardless of whether enabled or not. this message notifies the network of the mcp2502x/5x?s presence. the on bus message will (if enabled stcon.sten) repeat at a frequency determined by the stcon register (register 4-1). this message can also be configured to send the ?read a/d register? data bytes along with the predefined identifier in txid2 by setting stcon.stms = 1 . 4.2 message functions the mcp2502x/5x uses the global mask (rxmask), two filters (rxf0 and rxf1) and two receive buffers (rb0 and rb1) to determine if a received message should be acted upon. there are 16 functions that can be performed by the mcp2502x/5x based on received messages (see table 4-1).these functions allow the device to not only be accessed for information request/input/output operations, but also to be reconfigured via the can bus, if necessary. 4.3 message types there are three types of messages that are used to implement the functions of table 4-1. 1. information request messages (irm) - received by the mcp2502x/5x. 2. output messages - transmitted from the mcp2502x/5x as a response to irms. 3. input messages - received by the mcp2502x/ 5x and used to modify registers. note: the first on bus message sent after power-up will not send the ?read a/d register? data bytes, regardless of the stcon.stms value. note: if the mcp2502x/5x enters sleep mode, the scheduled transmissions will cease until the device wakes up again. this implies that sleep mode has priority over scheduled transmissions. note: information request messages (irms) and input messages are both input messages to the mcp2502x/5x. irms are received into receive buffer 0 and input messages are received into receive buffer 1. this must be taken into account while configuring the acceptance filters.
mcp2502x/5x ds21664d-page 22 ? 2007 microchip technology inc. 4.3.1 information request messages information request messages (irm) are messages that the mcp2502x/5x receives into receive buffer 0 (matches filter 0) and then responds to by transmitting a message (output message) containing the requested data. irms can be implemented as either a remote transfer request (rtr) or a data frame message by configuring the mtype bit in the optreg2 register. table 4-1: message function 4.3.1.1 rtr message type when rtr message types are selected (optreg2.mtype) and a node in the system wants information from the mcp2502x/5x, it has to send a remote frame on the bus. the identifier for the remote frame must be such that it will be accepted through the mcp2502x/5x?s mask/filter process (using rxf0). the rtr message type (remote frames) is the default configuration (mtype bit = 0 ). information request ?rtr? messages must not only meet the rxmask/rxf0 criteria but must also have the rtr bit of the can id set (since the filter registers do not contain an explicit rtr bit). if a message passes the mask/filter process and the rtr bit is a ? 0 ?, that message will be ignored. once the mcp2502x/5x has received a remote frame, it will determine the function to be performed based upon the three lsb?s (rxb0sidl.sid2:sid0 for standard messages and rxb0eid0.eid2:eid0 for extended messages) of the received remote frame. additionally, a predefined data length code (dlc) must be sent to signify the number of data bytes that the mcp2502x/5x must return in it?s output message (see table 4-2 and table 4-3). 4.3.1.2 data frame message type when a non-rtr (or data frame) message type is selected and a node in the system wants information from the mcp2502x/5x, it sends an information request in the form of a data frame. the identifier for this request must be such that it will be accepted through the mcp2502x/5x?s mask/filter process (using rxf0). information request messages in the data frame format must not only meet the rxmask/rxf0 criteria, but must also have the rtr bit of the can id cleared (since the filter registers do not contain an explicit rtr bit). if a message passes the mask/filter process and the rtr bit is a ? 1 ?, that message will be ignored. once the mcp2502x/5x has received a data frame information request, it will determine the function to be performed based upon the three lsb?s (rxb0sidl.sid2:sid0 for standard messages and rxb0eid0.eid2:eid0 for extended messages) of the received data frame. also, bit 3 of the received message id must be set to a ? 1 ?. in addition, the data length code (dlc) must be set to a zero. refer to table 4-2 and table 4-3 for more information. regardless of the message format, all messages except the read register message can use either standard or extended identifiers. the read register message has one additional requirement; it must be an extended identifier. this is discussed in more detail in table 4-1 and table 4-3 for more information. name description read a/d registers transmits a single message containing the current state of the analog and i/o registers, including the configuration read control registers transmits several control registers not included in other messages read configura- tion registers transmits the contents of many of the configuration registers read can error states transmits the error flag register and the error counts read pwm configuration transmits the registers associated with the pwm modules read user registers 1 transmits the values in bytes 0 - 7 of the user memory read user registers 2 transmits the values in bytes 8 -15 of the user memory read register * transmits a single byte containing the value in an addressed user memory register write register uses a mask to write a value to an addressed register write tx message id0 (txid0) writes the identifiers to a specified value write tx message id1 (txid1) writes the identifiers to a specified value write tx message id2 (txid2) writes the identifiers to a specified value write i/o configuration registers writes specified values to the three iocon registers write rx mask changes the receive mask to the specified value write rx filter0 changes the specified filter to the specified value write rx filter1 changes the specified filter to the specified value * the read register command is available when using extended message format only. not available with standard message format.
? 2007 microchip technology inc. ds21664d-page 23 mcp2502x/5x 4.3.2 output messages the data frame sent in response to the information request message is defined as an output message. if the data fame is in response to a remote frame, it will have the same identifier (standard or extended) and contain the same number of data bytes specified by the dlc of the remote frame (per the can 2.0b specification). if the output message is in response to a data frame, the lower-three lsb?s of the identifier (standard or extended) must be the same as the received message, as well as the upper-seven msb?s in the case of a standard identifier, or the upper 25 msb?s in the case of an extended identifier. bit 3 of a standard or extended identifier of the output message will differ from the received information request message in that the value equals ? 1 ? for an irm and equals ? 0 ? for the resulting output message. output messages contain the requested data (in the data field). example: the information request message read can error is a remote transmit request received by the mcp2502x/5x with a dlc of 3. the responding output message will return a data frame that contains the same identifier (standard or extended) as the receive message. the accompanying data bytes will contain the values of the predefined gpio registers and related control/status registers, as shown in table 4-2 and 4-3. 4.3.3 input messages input messages are received into receive buffer 1 and are used to change the values of the pre-defined groups of registers. there is also an input message that can change a single register?s contents. the primary purpose of input messages are to reconfigure mcp2502x/5x parameters (if needed) while in an operating can system and are, therefore, optional in system implementation. these messages are in the form of standard (or extended) data frames (per the can 2.0b specification) that have identifiers which pass the mcp2502x/5x?s mask/filter process (using rxf1). after passing the mask and filter, the lower- three bits of the standard identifier (rxf1sidl.sid2:sid0) will indicate which register(s) are to be written. the values for the register(s) are contained in the data byte registers as defined in table 4-2. 4.4 dynamic message handling the design insures that transmit and receive messages are handled properly for variable bus-loading conditions and different transmit/receive combinations. 4.4.1 message acceptance/ rejection messages received that meet the mask/rxfn criteria are then compared to the requirements for input messages or irms, as determined by the filter used to accept the message. if the message meets the requirements of one of the associated input or information request messages, the appropriate actions for that message function are taken. 4.4.2 receiving multiple messages the mcp2502x/5x can only receive and process one message at a time. while the mcp2502x/5x should have ample time to process any received message before another is completely received, a second message received before the first message is finished processing will be lost. however, the mcp2502x/5x has the ability to notify the network if a message is lost. txid1 can be configured to transmit a message if a receive overflow occurs (optreg2.caen = 0 ). note: if the dlc of the incoming remote frame differs from the message definitions summarized in table 4-2 and table 4-3, the resulting output message will limit itself to the erroneous dlc that was received (to maintain compliance with the bosch can specification). the output message will concatenate the number of data bytes for an erroneous dlc that is less than the defined number. for an erroneous dlc that is greater than the defined number, the mcp2502x/5x will extend the number of data bytes, with the data value of the last defined data byte being repeated in the extra bytes in the data field. note: if using more than one controlling node, the mcp2502x/5x must be set up to accept input messages with different identifiers in order to avoid possible message collisions in the dlc or data bytes if transmitted at the same time. note 1: irms can theoretically be sent by more than one controlling node because the message is a predefined constant and destructive collisions will not occur. 2: the number of data bytes in an input message must match the dlc number as defined in table 4-2 and table 4-3. if the user specifies and transmits an input message with a dlc that is less than the required number of data bytes, the mcp25020 will operate on corrupted data for the bytes that it did not receive and unknown results will occur.
mcp2502x/5x ds21664d-page 24 ? 2007 microchip technology inc. 4.4.3 transmit message priority there is a priority for all transmit messages, including txidn and all ?output? messages. the transmit message priority is as follows: 1. output messages have the highest priority. prioritization of the individual output message types is determined by the three bits that determine message type, with the lowest value having the highest priority (e.g., read a/d regs is a higher priority than read control regs). 2. txid2 (transmit auto-converted messages) has the second-highest priority. 3. txid1 (command acknowledge) has the third- highest priority. 4. txid0 (on bus message) has the lowest priority. in the event two or more messages are pending transmission, transmit-message-prioritization will occur and the highest message type will be sent first. messages that are currently transmitting will not be prioritized.
? 2007 microchip technology inc. ds21664d-page 25 mcp2502x/5x table 4-2: command messages (standard identifier) information request messages (to mcp2502x/5x) standard id data bytes 1 0 9876543210 r t r i d e dlc read a/d regs xxxxxxx * 0 0 0 1* 0 1 0 0 0 8* n/a n/a n/a n/a n/a n/a n/a n/a read control regs xxxxxxx * 0 0 1 1* 0 0 1 1 1 7* n/a n/a n/a n/a n/a n/a n/a n/a read config regs xxxxxxx * 0 1 0 1* 0 0 1 0 1 5* n/a n/a n/a n/a n/a n/a n/a n/a read can error xxxxxxx * 0 1 1 1* 0 0 0 1 1 3* n/a n/a n/a n/a n/a n/a n/a n/a read pwm config xxxxxxx * 1 0 0 1* 0 0 1 1 0 6* n/a n/a n/a n/a n/a n/a n/a n/a read user mem (bank1) xxxxxxx * 1 0 1 1* 0 1 0 0 0 8* n/a n/a n/a n/a n/a n/a n/a n/a read user mem (bank 2) xxxxxxx * 1 1 0 1* 0 1 0 0 0 8* n/a n/a n/a n/a n/a n/a n/a n/a output messages (from mcp2502x/5x) standard id data bytes 1 0 9876543210r t r i d e dlc read a/d regs x x x x x x x * 0 0 0 00 1 0 0 0 8 iointfl gpio an0h an1h an10l an2h an3h an32l read control regs x x x x x x x * 0 0 1 00 0 1 1 1 7 adcon0 adcon1 optreg optreg stcon iointen iointpo n/a read config regs x x x x x x x * 0 1 0 00 0 1 0 1 5 ddr gpio cnf1 cnf2 cnf3 n/a n/a n/a read can error x x x x x x x * 0 1 1 00 0 0 1 1 3eflg tec rec n/a n/a n/a n/a n/a read pwm config x x x x x x x * 1 0 0 00 0 1 1 0 6 pr1 pr2 t1con t2con pwm1dc pwm2dc n/a n/a read user mem (bank1) x x x x x x x * 1 0 1 00 1 0 0 0 8 userid0 userid1 userid2 userid3 userid4 userid5 userid6 userid7 read user mem (bank 2) x x x x x x x * 1 1 0 00 1 0 0 0 8 userid8 userid9 userid1 userid1 userid1 userid1 userid1 userid1 input messages** (to mcp2502x/5x) standard id data bytes 1 0 9876543210r t r i d e dlc write register x x x x x x x x 0 0 0 00 0 0 1 1 3 addr mask value n/a n/a n/a n/a n/a write tx message id 0 x x x x x x x x 0 0 1 00 0 1 0 0 4 tx0sidh tx0sidl tx0eid8 tx0eid0 n/a n/a n/a n/a write tx message id 1 x x x x x x x x 0 1 0 00 0 1 0 0 4 tx1sidh tx1sidl tx1eid8 tx1eid0 n/a n/a n/a n/a write tx message id 2 x x x x x x x x 0 1 1 00 0 1 0 0 4 tx2sidh tx2sidl tx2eid8 tx2eid0 n/a n/a n/a n/a write i/o configuration x x x x x x x x 1 0 0 00 0 1 0 1 5 iointen iointpo ddr optreg adcon1 n/a n/a n/a write rx mask xxxxxxxx 1 0 1 00 0 1 0 0 4 rxmsidh rxmsidl rxmeid8 rxmeid0 n/a n/a n/a n/a write rx filter0 x x x x x x x x 1 1 0 00 0 1 0 0 4 rxf0sid rxf0sid rxf0eid rxf0eid n/a n/a n/a n/a write rx filter1 x x x x x x x x 1 1 1 00 0 1 0 0 4 rxf1sid rxf1sid rxf1eid rxf1eid n/a n/a n/a n/a * if using non-rtr messages for information request messages (irm), the rtr bit = 0 , dlc bit field = 0 , and bit 3 of the irm id = 1 . also, bit 3 of the output message id = 0 . if using rtr messages for irms, the rtr bit = 1 , dlc bit field = number of bytes in corresponding output message, and bit three of the irm id = x (don?t care), also, bit 3 of the output message = x (don?t care). ** user-defined irm ids must be different from input message ids to avoid message contention between the corresponding output me ssage and the input message.
mcp2502x/5x ds21664d-page 26 ? 2007 microchip technology inc. table 4-3: command messages (extended identifier) information request messages (to mcp2502x/5x) standard id extended id data bytes 1 0 9876543210r t r i d e dlc 1 7 1 6 rxbeid8 (8 bits) rxbeid0 (8 bits) read a/d regs x x xxxxxxxxx 11 1 0 0 0 8* x x xxxx xxxx xxxx *000 n/a n/a n/a n/a n/a n/a n/a n/a read control regs x x xxxxxxxxx 11 0 1 1 1 7* x x xxxx xxxx xxxx *001 n/a n/a n/a n/a n/a n/a n/a n/a read config regs x x xxxxxxxxx 11 0 1 0 1 5* x x xxxx xxxx xxxx *010 n/a n/a n/a n/a n/a n/a n/a n/a read can error x x xxxxxxxxx 11 0 0 1 1 3* x x xxxx xxxx xxxx *011 n/a n/a n/a n/a n/a n/a n/a n/a read pwm config x x xxxxxxxxx 11 0 1 1 0 6* x x xxxx xxxx xxxx *100 n/a n/a n/a n/a n/a n/a n/a n/a read user mem x x xxxxxxxxx 11 1 0 0 0 8* x x xxxx xxxx xxxx *101 n/a n/a n/a n/a n/a n/a n/a n/a read user mem x x xxxxxxxxx 11 1 0 0 0 8* x x xxxx xxxx xxxx *110 n/a n/a n/a n/a n/a n/a n/a n/a read register x x xxxxxxxxx 1 1 0 0 0 0 1* x x addr xxxx *111 n/a n/a n/a n/a n/a n/a n/a n/a output messages (from mcp2502x/5x) standard id extended id data bytes 1 0 9876543210r t r i d e dlc 1 7 1 6 rxbeid8 (8 bits) rxbeid0 (8 bits) read a/d regs x xxxxxxxxxx 01 1 0 0 0 8 x x xxxx xxxx xxxx *000 iointfl gpio an0h an1h an10l an2h an3h an32l read control regs x xxxxxxxxxx 01 0 1 1 1 7 x x xxxx xxxx xxxx *001 adcon0 adcon1 optreg optreg stcon iointen iointpo n/a read config regs x xxxxxxxxxx 01 0 1 0 1 5 x x xxxx xxxx xxxx *010 ddr gpio cnf1 cnf2 cnf3 n/a n/a n/a read can error x xxxxxxxxxx 01 0 0 1 1 3 x x xxxx xxxx xxxx *011 eflg tec rec n/a n/a n/a n/a n/a read pwm config x xxxxxxxxxx 01 0 1 1 0 6 x x xxxx xxxx xxxx *100 pr1 pr2 t1con t2con pwm1d pwm2d n/a n/a read user mem x xxxxxxxxxx 01 1 0 0 0 8 x x xxxx xxxx xxxx *101 userid0 userid1 userid2 userid3 userid4 userid5 userid6 userid7 read user mem x xxxxxxxxxx 01 1 0 0 0 8 x x xxxx xxxx xxxx *110 userid8 userid9 userid1 userid1 userid1 userid1 userid1 userid1 read register x xxxxxxxxxx 0 1 0 0 0 0 1xx addr xxxx *111 value n/a n/a n/a n/a n/a n/a n/a input messages (to mcp2502x/5x) standard id extended id data bytes 1 0 9876543210r t r i d e dlc 1 7 1 6 rxbeid8 (8 bits) rxbeid0 (8 bits) write register xxxxxxxxxxx0 1 0 0 1 1 3 x x xxxx xxxx xxxx x000 addr mask value n/a n/a n/a n/a n/a write tx message x xxxxxxxxxx0 1 0 1 0 0 4 x x xxxx xxxx xxxx x001 tx0sidh tx0sidl tx0eid8 tx0eid0 n/a n/a n/a n/a write tx message x xxxxxxxxxx0 1 0 1 0 0 4 x x xxxx xxxx xxxx x010 tx1sidh tx1sidl tx1eid8 tx1eid0 n/a n/a n/a n/a write tx message x xxxxxxxxxx0 1 0 1 0 0 4 x x xxxx xxxx xxxx x011 tx2sidh tx2sidl tx2eid8 tx2eid0 n/a n/a n/a n/a write i/o configura- xxxxxxxxxxx0 1 0 1 0 1 5 x x xxxx xxxx xxxx x100 iointen iointpo ddr optreg adcon1 n/a n/a n/a write rx mask xxxxxxxxxxx0 1 0 1 0 0 4 x x xxxx xxxx xxxx x101 rxm- rxmsidl rxmeid8 rxmeid0 n/a n/a n/a n/a write rx filter0 xxxxxxxxxxx0 1 0 1 0 0 4 x x xxxx xxxx xxxx x110 rxf0sid rxf0sid rxf0eid rxf0eid n/a n/a n/a n/a write rx filter1 xxxxxxxxxxx0 1 0 1 0 0 4 x x xxxx xxxx xxxx x111 rxf1sid rxf1sid rxf1eid rxf1eid n/a n/a n/a n/a * if using non-rtr messages for information request messages (irm), the rtr bit = 0 , dlc bit field = 0 , and bit 3 of the irm id = 1 . also, bit 3 of the output message id = 0 . if using rtr messages for irms, the rtr bit = 1 , dlc bit field = number of bytes in corresponding output message, and bit three of the irm id = x (don?t care), also, bit 3 of the output message = x (don?t care). ** user-defined irm ids must be different from input message ids to avoid message contention between the corresponding output me ssage and the input message.
? 2007 microchip technology inc. ds21664d-page 27 mcp2502x/5x 4.5 automatic transmission the mcp2502x/5x can automatically initiate four different message types to indicate the following situations: ? edge detected on a digital input (txid2). ? threshold exceeded on an analog input (txid2). ? error condition (read error output message). ? scheduled transmissions (txid0). the buffers have an implied transmit priority, where buffer 2 is the highest and buffer 0 is the lowest. therefore, multiple message buffers can be requested for transmission and each one will be sent in order of priority. 4.5.1 digital input edge detection each gpio pin configured as a digital input can be individually configured to automatically transmit a message when a defined edge occurs, as explained in the gpio module section. when transmitting this message, the mcp2502x/5x uses txid2. the dlc is set to two and the first two bytes of the read a/d registers (iointfl and gpio) are sent. 4.5.2 analog input threshold detection each gpio pin that has been configured as an analog input can be individually configured to automatically transmit a message when a threshold is exceeded as described in the analog-to-digital converter module section. the mcp2502x/5x sends txid2 when transmitting this message. the dlc is set to eight and the eight bytes of the ?read a/d registers? are sent. 4.5.2.1 hysteresis function this function is automatic and will insure that an analog value that is on the compare edge (i.e., toggling lsb) does not fill the can bus with continuous a/d message transmissions. the hysteresis uses the two lsb?s of the compare register. these two bits are forced and are not configurable by the user. they will be forced to either b?00? or b?11? , depending on the compare polarity. if configured for a/d result > compare register, the automatic transmission will occur when the a/d value is greater than or equal to b?nnnn nnnn 11? and reset when less than or equal to b?nnnn nnnn 00? . the opposite conditions must occur if the compare polarity is set for a/d result < compare register. a hysteresis example: ? the user sets the upper-eight bits of the 10-bit compare register (adcmp0h). the lower-two bits of the compare register are not configurable by the user and are forced to either b?11? or b?00? depending on the polarity of the compare threshold (i.e., transmit is triggered above or below the compare value via the iointpo register). ? the user sets the polarity of the compare threshold (iointpo). in this example, the threshold is set for triggering a message on an a/d > compare register. the two lsb?s are forced to b?11? . ? when the a/d conversion exceeds the compare register ( b?nnnn nnnn 11? ), an automatic transmission will occur once. ? in order for the automatic transmission to occur again, the a/d value must first drop below the compare register b?nnnn nnnn 00? and then back above the compare register b?nnnn nnnn 11? . figure 4-1: hysteresis function 4.5.3 error condition the mcp2502x/5x can be configured to automatically transmit a message whenever one or more of the following error conditions occur: ? receiver has entered error-warning state ? receiver has entered error-passive state ? transmitter has entered error-warning state ? transmitter has entered error-passive state ? a receive buffer has overflowed note: the gpio register that is sent with the message (data byte 2) can be ignored if there are no digital inputs enabled for change-of-state, as it contains no useful information for the analog input threshold detect function. lsbs = b?11? set to trigger when a/d>compare register lsbs = b?00? lsbs = b?11? lsbs = b?00? set to trigger when a/d mcp2502x/5x ds21664d-page 28 ? 2007 microchip technology inc. if the error condition message is enabled (optreg2.txone = 1 ) and one of the above conditions occur, the mcp2502x/5x sends txid1 identifier with output message read can error states data field (three data bytes). 4.5.4 scheduled transmissions the mcp2502x/5x has the capability of sending scheduled transmissions (on bus message), if enabled. the scheduled transmission control register (stcon) enables and configures the occurrence of the scheduled message. setting the sten bit in the stcon register enables the scheduled message. the stbf1:stbf0 and stm3:stm0 bits allow a scheduled transmission to be initiated from a minimum of 256 s to a maximum of 16.8 seconds (using a 16 mhz f osc ) and the following equation: message type - the message sent for scheduled transmissions consists of either txid0 with zero data bytes or txid0 with eight data bytes containing the read a/d regs message, depending on stms bit in the stcon register. register 4-1: stcon - scheduled transmissio n control register note: the actual scheduled transmission intervals may vary slightly due to the internal event que of the control module. scheduled transmission = stbf1:stbf0(stm3:stm0) r/w-0 r/w-0 r/w-1 r/w-1 r/w-1 r/w-1 r/w-1 r/w-1 sten stms stbf1 stbf0 stm3 stm2 stm1 stm0 bit 7 bit 0 bit 7 sten: scheduled transmission enable bits 1 = enabled 0 =disabled bit 6 stms: scheduled transmission message select 1 = sends transmit id 0 (txid0) with the ?read a/d regs? data (dlc = 8 ) 0 = sends transmit id 0 (txid0) with no data (dlc = 0 ) bit 5-4 stbf1:stbf0 : base transmission frequency bits 00 = 4096t osc 01 = 16 ? (4096t osc ) 10 = 256 ? (4096t osc ) 10 = 4096 ? (4096t osc ) (e.g., stbf1:stbf0 => 00 => 256 s for a 16 mhz f osc ) bit 3-0 stm3:stm0: scheduled transmission multiplier bits 0000 = 1 0001 = 2 - - 1110 = 15 1111 = 16 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? - n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown
? 2007 microchip technology inc. ds21664d-page 29 mcp2502x/5x table 4-4: registers associated with the can module addr name bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0 value on por value on rst 0bh cnf1 sjw1 sjw0 brp5 brp4 brp3 brp2 brp1 brp0 xxxx xxxx uuuu uuuu 0ch cnf2 btlm- ode sam phseg12 phseg11 phseg10 prseg2 prseg1 prseg0 xxxx xxxx uuuu uuuu 0dh cnf3 ? wakf ? ? ? phseg22 phseg21 phseg20 -x-- xxxx -u-- uuuu 10h stcon stem stms stbf1 stbf0 stm3 stm2 stm1 stm0 0xxx xxxx 0uuu uuuu 11h optreg2 caen erre txone slpen mtype pdefen puslp punrm 0000 0000 uuuu uuuu 14h rxmsidh sid10 sid9 sid8 sid7 sid6 sid5 sid4 sid3 xxxx xxxx uuuu uuuu 15h rxmsidl sid2 sid1 sid0 ? ? ? eid17 eid16 xxx- --xx uuu- --uu 16h rxmeid8 eid15 eid14 eid13 eid12 eid11 eid10 eid9 eid8 xxxx xxxx uuuu uuuu 17h rxmeid0 eid7 eid6 eid5 eid4 eid3 eid2 eid1 eid0 xxxx xxxx uuuu uuuu 18h rxf0sidh sid10 sid9 sid8 sid7 sid6 sid5 sid4 sid3 xxxx xxxx uuuu uuuu 19h rxf0sidl sid2 sid1 sid0 ? ? ? eid17 eid16 xxx- --xx uuu- --uu 1ah rxf0eid8 eid15 eid14 eid13 eid12 eid11 eid10 eid9 eid8 xxxx xxxx uuuu uuuu 1bh rxf0eid0 eid7 eid6 eid5 eid4 eid3 eid2 eid1 eid0 xxxx xxxx uuuu uuuu 1ch rxf1sidh sid10 sid9 sid8 sid7 sid6 sid5 sid4 sid3 xxxx xxxx uuuu uuuu 1dh rxf1sidl sid2 sid1 sid0 ? ? ? eid17 eid16 xxx- --xx uuu- --uu 1eh rxf1eid8 eid15 eid14 eid13 eid12 eid11 eid10 eid9 eid8 xxxx xxxx uuuu uuuu 1fh rxf1eid0 eid7 eid6 eid5 eid4 eid3 eid2 eid1 eid0 xxxx xxxx uuuu uuuu 20h txb0sidh sid10 sid9 sid8 sid7 sid6 sid5 sid4 sid3 xxxx xxxx uuuu uuuu 21h txb0sidl sid2 sid1 sid0 ? exide ? eid17 eid16 xxx- x-xx uuu- u-uu 22h txb0eid8 eid15 eid14 eid13 eid12 eid11 eid10 eid9 eid8 xxxx xxxx uuuu uuuu 23h txb0eid0 eid7 eid6 eid5 eid4 eid3 eid2 eid1 eid0 xxxx xxxx uuuu uuuu 24h txb1sidh sid10 sid9 sid8 sid7 sid6 sid5 sid4 sid3 xxxx xxxx uuuu uuuu 25h txb1sidl sid2 sid1 sid0 ? exide ? eid17 eid16 xxx- x-xx uuu- u-uu 26h txb1eid8 eid15 eid14 eid13 eid12 eid11 eid10 eid9 eid8 xxxx xxxx uuuu uuuu 27h txb1eid0 eid7 eid6 eid5 eid4 eid3 eid2 eid1 eid0 xxxx xxxx uuuu uuuu 28h txb2sidh sid10 sid9 sid8 sid7 sid6 sid5 sid4 sid3 xxxx xxxx uuuu uuuu 29h txb2sidl sid2 sid1 sid0 ? exide ? eid17 eid16 xxx- x-xx uuu- u-uu 2ah txb2eid8 eid15 eid14 eid13 eid12 eid11 eid10 eid9 eid8 xxxx xxxx uuuu uuuu 2bh txb2eid0 eid7 eid6 eid5 eid4 eid3 eid2 eid1 eid0 xxxx xxxx uuuu uuuu
mcp2502x/5x ds21664d-page 30 ? 2007 microchip technology inc. notes:
? 2007 microchip technology inc. ds21664d-page 31 mcp2502x/5x 5.0 gpio module 5.1 description the mcp2502x/5x has eight general-purpose input/ output pins (gp0 to gp7), collectively labeled gpio. all gpio port pins have ttl input levels and full cmos output drivers, with the exception of gp7, which is input only. pins gp6:gp0 can be individually configured as input or output via the gpddr register. each of the gpio pins has a weak internal pull-up resistor. a single control bit (optreg.gppu ) can turn on/off all the pull-ups. the weak pull-up is automatically turned off when the port pin is configured as an output. the pull-ups are disabled during a power-on reset. all pins are multiplexed with an alternate function, including analog-to-digital conversion on up to four of the gpio pins, analog v ref inputs up to two pins, pwm outputs up to two pins, clock-out function and external reset. the operation of each pin is selected by clearing, or setting, control bits in various control registers. gpio pin functions are summarized in table 5-1. table 5-1: gpio functions 5.2 digital input edge detection all gpio pins have a digital input edge detection feature that will automatically transmit a message when an edge with the proper polarity occurs on any of the digital inputs. only pins configured as inputs and enabled for this function via control register iointpo will perform this operation. three control registers are associated with this function. an enable pin for each gpio pin resides in the iointen register. when a bit is set to a ' 1 ', the corresponding gpio pin is enabled to generate a transmit-on-change message (txid2) when an edge of specified polarity occurs. the digital edge detection function on a gpio pin configured as a digital input is edge triggered. a rising- edge will generate a transmission if the corresponding bit in the iointpo register is set. a falling-edge will generate a transmission if the bit is cleared. when a valid edge appears on the enabled gpio pin, can message txid2 is initiated. the edge-detection function on any given gpio pin (configured as a digital input) can wake up the processor from sleep if the corresponding interrupt enable bit in the iointen register was set prior to going into sleep mode. if a wake-up from sleep is caused in this manner, the device will immediately initiate a transmit message (txid2). note: the gpddr register controls the direction of the gpio pins, even when they are being used as analog inputs. the user must ensure that the bits in the gpddr register are maintained set (input) when using them as analog inputs. name bit # function gp0/an0 bit0 i/o or analog input gp1/an1 bit1 i/o or analog input gp2/an2/pwm2 bit2 i/o, analog input or pwm out gp3/an3/pwm3 bit3 i/o, analog input or pwm out gp4/v ref - bit4 i/o or analog voltage reference gp5/v ref + bit5 i/o or analog voltage reference gp6/clkout bit6 i/o or clock output gp7/nrst/v pp bit7 input, external reset input or programming voltage input note: refer to section 7.4 ?a/d threshold detection? for information regarding a/d channels.
mcp2502x/5x ds21664d-page 32 ? 2007 microchip technology inc. register 5-1: gpddr - data direction register register 5-2: gplat - gpio output register register 5-3: iointen register u-0 r/w-1 r/w-1 r/w-1 r/w-1 r/w-1 r/w-1 r/w-1 ? ddr6 ddr5 ddr4 ddr3 ddr2 ddr1 ddr0 bit 7 bit 0 bit 7 unimplemented: read as ?0? bit 6-0 ddr6:ddr0 : data direction register* bits 1 = corresponding gpio pin is configured as an input 0 = corresponding gpio pin is configured as an output * must bet set if corresponding analog channel is enabled (see adcon1) legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? - n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 ? gp6 gp5 gp4 gp3 gp2 gp1 gp0 bit 7 bit 0 bit 7 unimplemented: read as ' 0 ? bit 6-0 gp6:gp0 : gpio bits 1 = corresponding gpio pin output latch is a ? 1 ? 0 = corresponding gpio pin output latch is a ? 0 ? legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? - n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 gp7txc gp6txc gp5txc gp4txc gp3txc gp2txc gp1txc gp0txc bit 7 bit 0 bit 7-0 gp7txc:gp0txc : transmit-on-change enable bits 1 = enable transmit-on-change/compare for corresponding gpio/an channel 0 = disable transmit-on-change/compare for corresponding gpio/an channel legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? - n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown
? 2007 microchip technology inc. ds21664d-page 33 mcp2502x/5x register 5-4: iointpo register register 5-5: iointfl register r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 gp7pol gp6pol gp5pol gp4pol gp3pol gp2pol gp1pol gp0pol bit 7 bit 0 bit 7-0 gp7pol:gp0pol : transmit-on-change polarity bits 1 = digital inputs: low-to-high transition on corresponding gpio input pin generates a transmit message analog inputs: a/d result above compare value generates a transmit message 0 = digital inputs: high-to-low transition on corresponding gpio input generates transmit message analog inputs: a/d result below compare value generates a transmit message legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? - n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown r-0 r-0 r-0 r-0 r-0 r-0 r-0 r-0 gp7txf gp6txf gp5txf gp4txf gp3txf gp2txf gp1txf gp0txf bit 7 bit 0 bit 7-0 gp7txf:gp0txf : transmit-on-change polarity bits 1 = digital inputs: a valid edge has occurred on the digital input analog inputs: a/d result does exceed the compare threshold 0 = digital inputs: a valid edge has not occurred on the digital input analog inputs: a/d result does not exceed the compare threshold legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? - n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown
mcp2502x/5x ds21664d-page 34 ? 2007 microchip technology inc. register 5-6: optreg1 register r/w-1 r/w-1 r/w-1 r/w-1 u-0 r/w-0 r/w-0 r/w-0 gppu clken clkps1 clkps0 ? cmreq aqt1 aqt0 bit 7 bit 0 bit 7 gppu : weak pull-up enabled 1 = weak pull-ups disabled 0 = weak pull-ups enabled (gp7:gp0) bit 6 clken : 1 = clock out function disabled 0 = clock out function enabled bit 5-4 clkps1:clkps0: clkout prescaler bits 00 = f osc /1 01 = f osc /2 10 = f osc /4 11 = f osc /8 bit 3 reserved : bit 2 cmreq : requests mode of operation (allows mode changes via the can bus) 1 = requests listen-only mode 0 = requests normal mode * * cmreq must be cleared as default to avoid device entering listen-only mode on first ?input? message. bit 1-0 aqt1:aqt0 : analog acquisition time bits 00 = 64t osc 01 = 2 ? (64t osc ) 10 = 4 ? (64t osc ) 11 = 8 ? (64t osc ) (e.g., aqt1:aqt0 => 00 => 2.56 s for a 25 mhz f osc ) legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? - n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown
? 2007 microchip technology inc. ds21664d-page 35 mcp2502x/5x register 5-7: optreg2 register table 5-2: summary of registers associated with gpio module r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 caen erren txonen slpen mtype pdefen puslp punrm bit 7 bit 0 bit 7 caen : command acknowledge enable bit 1 = enables the command acknowledge message (txid1) 0 = enables the receive overflow message (txid1) bit 6 erren : error recovery enable bit 1 = mcp2502x/5x will recover into listen-only mode from bus off 0 = mcp2502x/5x will recover into normal mode from bus-off bit 5 txonen: transmit on error condition bit(rec or tec) 1 = enable, will send message if error counter(s) go high enough 0 = disable, will not send message regardless of error counter values bit 4 slpen: low power sleep mode enable/disable 1 = device will enter sleep if bus is idle for at least 1408 bit times 0 = sleep mode is disabled bit 3 mtype : determines if information request messages use rtr or not 1 = rtr is not used for irm (data frame) 0 = rtr is used for irm (remote frame) bit 2 pdefen : enables pwm outputs to return to por default values when can bus communication is lost 1 = enables pwm output default values 0 = disables pwm output default values bit 1 puslp : allows device to enter sleep while in listen-only mode during power-up sequence 1 = enables sleep when in listen-only mode during power-up sequence 0 = disables sleep when in listen-only mode during power-up sequence bit 0 punrm : enters normal mode after completing self-configuration during power-up sequence 1 = enters ?normal? mode after completing self-configuration during power-up sequence 0 = enables ?listen-only? mode after completing self-configuration during power-up sequence and waits for an error-free message before switching to normal mode legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? - n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown addr name bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0 value on por value on rst bank 0 34h gpddr ? ddr6 ddr5 ddr4 ddr3 ddr2 ddr1 ddr0 -111 1111 -111 1111 00h iointen gp7txc gp6txc gp5txc gp4txc gp3txc gp2txc gp1txc gp0txc 0000 0000 0000 0000 01h iointpo gp7pol gp6pol gp5pol gp4pol gp3pol gp2pol gp1pol gp0pol 0000 0000 0000 0000 04h optreg1 gppu clken clkps1 clkps0 ? cmreq aqt1 aqt0 0000 ---- 0000 ---- legend: x = unknown, u = unchanged, - = unimplemented read as ?0?. shaded cells are not used by module.
mcp2502x/5x ds21664d-page 36 ? 2007 microchip technology inc. notes:
? 2007 microchip technology inc. ds21664d-page 37 mcp2502x/5x 6.0 pwm module 6.1 description there are two pulse width modulation (pwm) modules (pwm1 and pwm2) that generate up to a 10-bit resolution output signal on gp2 and gp3, respectively. each of these outputs can be separately enabled, with each having its own associated timer, duty cycle and period registers for controlling the pwm output shape. each pwm module contains a set of master/slave duty cycle registers, providing up to a 10-bit resolution pwm output. figure 6-1 shows a simplified block diagram of the pwm module. a pwm output has a time base (period) and a time that the output stays high (duty cycle), as shown in figure 6-2. the frequency of the pwm is the inverse of the period (1/period). at power-on, the pwm outputs are not enabled until after the self-configuration sequence has been completed (i.e., all sram registers have been loaded with their default values) to prevent invalid signals from occurring on the pwm outputs. figure 6-1: simplified block diagram the pwm outputs can be forced to their default por conditions if can bus communication is lost and is enabled via optreg2.pdefen. the system designer must implement a hand-shaking protocol, such that the mcp2505x will receive a valid message into one of the receive buffers before four successive scheduled transmissions occur. if a valid message is not received, the pwm outputs gp2 and gp3 will automatically reconfigure to their default conditions. this includes the pwm module itself being disabled and the gpio being forced low, high or tri-state. figure 6-2: pwm output 6.2 pwm timer modules there are two 8-bit timers supporting the two pwm outputs. both timers have a prescaler only. the timers are readable and writable and are cleared on any device reset or when the timer is turned off. the input clock (f osc /4) has a prescale option of 1:1, 1:4 or 1:16, selected by control bits tnckps[1:0] in register tncon<5:4> (where n corresponds to the appropriate timer). each timer module has an 8-bit period register, prn. prn is a readable and writable register. the timer module increments from 00h until it matches prn and then resets to 00h on the next increment cycle. the prn register is set when the device is reset. each timer can be shut off by clearing control bit tmrnon (tncon<7>). 6.2.1 timer module prescaler the prescaler counters are cleared when a write to the tncon or tmrn register or any device reset (rst reset or power-on reset) occurs. 6.3 pwm modules each pwm module contains a set of master/slave duty cycle registers, providing up to a 10-bit resolution pwm output. figure 6-2 shows a simplified block diagram of the pwm module. 6.3.1 pwm period the pwm period is specified by writing to the prn register. the pwm period can be calculated using the following formula: when tmrn is equal to prn, the following two events occur on the next cycle: ?tmrn is cleared ? the pwm duty cycle is latched from pwmndch into pwmndbh pwmndch pwmndbh tmrn prn note comparator ddr gp (pwmn) comparator tncon (2 lsb) duty cycle r s q 1 registers note 1: 8-bit timer is concatenated with 2-bit interna l q clock or 2 bits of the prescaler to create 10-bit time base tmrn = prn period duty cycle tmrn = prn tmrn=duty cycle pwm period pr n () 1 + [] *4 t osc * tmrn prescale value () = pwm frequency 1 pwm period () ? =
mcp2502x/5x ds21664d-page 38 ? 2007 microchip technology inc. 6.3.2 pwm duty cycle the pwm duty cycle is specified by writing to the pwmndch and tncon registers. up to 10-bit resolution is available. the pwmndch contains the eight msb?s, while the tncon register contains the two lsb?s. this 10-bit value is represented by pwm1dch:t1con<1:0> for pwm module 1 and pwm2dch:t2con<1:0> for pwm module 2. the following equation is used to calculate the pmw duty cycle: pwmndch can be written to at any time, but the duty cycle value is not latched into pwmndbh until after a match between prn and tmrn occurs (i.e., the period is complete). the pwmndbh register and 2-bit internal latch are used to double-buffer the pwm duty cycle. this double-buffering is essential for glitchless pwm operation. when the pwmndbh and 2-bit latch match tmrn concatenated with an internal 2-bit q clock or 2 bits of the tmrn prescaler, the pwm output pin is cleared. maximum pwm resolution (bits) for a given pwm frequency is equal to: in order to achieve higher resolution, the pwm frequency must be decreased. in order to achieve higher pwm frequency, the resolution must be decreased. table 6-1 lists example pwm frequencies and resolutions for f osc = 20 mhz. tmrn prescaler and prn values are also shown. table 6-1: pwm frequencies and resolutions at 20 mhz register 6-1: pwm1 duty cycle register msb (pwm1dch) register 6-2: pwm2 duty cycle register msb (pwm2dch) pwmdc pwmndc () =*t osc *tmrn (prescale) note: if the pwm duty cycle value is longer than the pwm period (pwm duty cycle = 100%), the pwm output pin will not be cleared. log f osc () fpwm () ? () log 2 () bits () ? pwm frequency 1.22 khz 4.88 khz 19.53 khz 78.12 khz 156.30 khz 208.30 khz timer prescaler (1, 4, 16) 1641111 prn value 0xff 0xff 0xff 0x3f 0x1f 0x17 maximum resolution (bits) 10 10 10 8 7 5.5 r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x dc1b9 dc1b8 dc1b7 dc1b6 dc1b5 dc1b4 dc1b3 dc1b2 bit 7 bit 0 bit 7-0 dc1b9:dc1b2 : most significant pwm0 duty cycle bits legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? - n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x dc2b9 dc2b8 dc2b7 dc2b6 dc2b5 dc2b4 dc2b3 dc2b2 bit 7 bit 0 bit 7-0 dc2b9:dc2b2 : most significant pwm2 duty cycle bits legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? - n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown
? 2007 microchip technology inc. ds21664d-page 39 mcp2502x/5x register 6-3: t1con: timer1 cont rol register register 6-4: t2con: timer2 cont rol register r/w-0 u-0 r/w-0 r/w-0 u-0 u-0 r/w-x r/w-x tmr1on ? t1ckps1 t1ckps0 ? ? dc1b1 dc1b0 bit 7 bit 0 bit 7 tmr1on : timer1 on bit 1 = enables timer1 0 = disables timer1 bit 6 unimplemented : read as ' 0 ' bit 5-4 t1ckps1:t1ckps0 : timer1 clock prescale select bits 00 = prescaler is 1 01 = prescaler is 4 1x = prescaler is 16 bit 3-2 unimplemented : read as ' 0 ' bit 1-0 dc1b1:dc1b0 : least significant pwm1 duty cycle bits legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? - n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown r/w-0 u-0 r/w-0 r/w-0 u-0 u-0 r/w-x r/w-x tmr2on ? t2ckps1 t2ckps0 ? ? dc2b1 dc2b0 bit 7 bit 0 bit 7 tmr2on : timer2 on bit 1 = enables timer2 0 = disables timer2 bit 6 unimplemented : read as '0' bit 5-4 t2ckps1:t2ckps0 : timer2 clock prescale select bits 00 = prescaler is 1 01 = prescaler is 4 1x = prescaler is 16 bit 3-2 unimplemented : read as ' 0 ' bit 1-0 dc2b1:dc2b0 : least significant pwm2 duty cycle bits legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? - n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown
mcp2502x/5x ds21664d-page 40 ? 2007 microchip technology inc. register 6-5: pr1: period register register 6-6: pr2: period register table 6-2: registers associated with the pwm module r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x pr1b7 pr1b6 pr1b5 pr1b4 pr1b3 pr1b2 pr1b1 pr1b0 bit 7 bit 0 bit 7-0 pr1b7:pr1b0 : pwm1 period register bits legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? - n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x pr2b7 pr2b6 pr2b5 pr2b4 pr2b3 pr2b2 pr2b1 pr2b0 bit 7 bit 0 bit 7-0 pr2b7:pr2b0 : pwm2 period register bits legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? - n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown addr name bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0 value on por value on rst 34h gpddr ? ddr6 ddr5 ddr4 ddr3 ddr2 ddr1 ddr0 -111 1111 -111 1111 05h t1con tmr1on ? t1ckps1 t1ckps0 ? ? dc1b1 dc1b0 0-00 --xx 0-00 --uu 06h t2con tmr2on ? t2ckps1 t2ckps0 ? ? dc2b1 dc2b0 0-00 --xx 0-00 --uu 07h pr1 timer 1 module?s period register 1111 1111 1111 1111 08h pr2 timer 2 module?s period register 1111 1111 1111 1111 09h pwm1dch dc1b9 dc1b8 dc1b7 dc1b6 dc1b5 dc1b4 dc1b3 dc1b2 xxxx xxxx uuuu uuuu 0ah pwm2dch dc2b9 dc2b8 dc2b7 dc2b6 dc2b5 dc2b4 dc2b3 dc2b2 xxxx xxxx uuuu uuuu legend: x = unknown, u = unchanged, - = unimplemented read as ?0?. shaded cells are not used by module.
? 2007 microchip technology inc. ds21664d-page 41 mcp2502x/5x 7.0 analog-to-digital converter (a/d) module 7.1 description the analog-to-digital (a/d) module is a four-channel, 10-bit successive approximation type of a/d. the a/d allows conversion of an analog input signal to a corresponding 10-bit number. the four channels are multiplexed on the gp[3:0] pins. the converter is turned off/on via the adcon0 register and each channel is individually enabled via the adcon1 control register. the v ref + and v ref - sources are user- selectable as internal or external. each channel can be set to one of two conversion modes: 1. auto-conversion 2. convert-on-request. 7.2 a/d module registers the a/d module itself has several registers. the registers are: ? a/d control register 0 (adcon0) ? a/d control register 1 (adcon1) ? transmit-on-change register (iointen) ? compare and polarity register (adcmpnl) ? a/d result registers (adresnl, adresnh) the adcon0 register controls the operation of the a/d module, including auto-conversion rate and enable bit. the adcon1 register enables the a/d function on port pins gp3:gp0, a/d conversion rate and selects the voltage reference source. the iointen register?s four least significant bits enable/disable the transmit- on-change function. the adcmpnl.adpol bit sets the polarity (above or below threshold) for the transmit- on-change function. the result of an a/d conversion is made available to the user within the data field of the read a/d registers output message via the can bus. this message can be directly requested by another can node or be automatically transmitted (txido), as has been described previously. additionally, the individual channel results may be read using the ?read register? command as described in section 4.3.1 ?information request messages? and as shown in table 3-2 by addressing the appropriate a/d result register (adresnl and adresnh). 7.3 a/d conversion modes there are two modes of conversion that can be individually selected for each analog channel that has been enabled. these are auto-conversion and conversion-on-request. 7.3.1 auto-conversion mode if the auto-conversion mode is selected (stcon), an a/d conversion is performed sequentially for each channel that has been set to analog input mode and has been configured for auto-conversion mode. conversion starts with an0 and is immediately followed by an1, etc. once the conversion has completed, the value is stored in the analog channel registers for the respective channel. the rate of the auto-conversion is determined by a timer and prescaler. the formula for determining conversion rates is: typical conversion rates with a 20 mhz oscillator input are shown in table 7-1. table 7-1: auto-conversion rates for given prescale rates at 20 mhz the timer is turned on if one of the gpntxc bits are set in the iointen register and configured as analog input. the prescaler counter is cleared when the device is reset (rst reset or power-on reset). note: the gpddr register controls the direction of the gpio pins, even when they are being used as analog inputs. the user must ensure that the bits in the gpddr register are maintained set (input) when using them as analog inputs. tops[2:0] prescale rate auto-conversion rate 000 1:1 51 s 001 1:8 410 s 010 1:32 2 ms 011 1:128 7 ms 100 1:512 26 ms 101 1:1024 52 ms 110 1:2048 105 ms 111 1:4096 210 ms t osc () 1024 () prescaler rate ()
mcp2502x/5x ds21664d-page 42 ? 2007 microchip technology inc. 7.3.2 conversion-on-request mode if the conversion-on-request mode is selected, the device performs an a/d conversion only after receiving a read a/d registers or read register receive message (irm). in the case of the read a/d registers command, all of the gpio pins that have been configured as analog input channels will have an a/d conversion done before the data frame is sent. when a read register receive message is initiated (extended message format only), the a/d conversion is performed when the msb of the analog channel is requested, with the msb result being transferred. a subsequent read of the lsb will transmit the value latched when the msb was requested (it is recommended that the read a/d registers receive message is used to obtain complete analog channel values in one message). 7.4 a/d threshold detection once an a/d auto-conversion has been completed, the a/d channel result(s) can be compared to a value stored in the associated a/d channel comparator registers. if the value in the analog channel result registers (i.e., an0l and an10h registers for analog channel 0) is lower or higher than the value in the a/d comparator registers (as specified by a corresponding polarity bit), a transmit-on-change message will be sent (txid2). the threshold-detection function for all analog channels is bit-selectable. if the a/d channel has been configured for transmit-on- change mode, the mcp2505 will send a transmit message with the appropriate data. it is possible that more than one a/d channel has a change-of-state condition. this does not pose a problem since all analog channel data is provided in the transmit message. register 7-1: a/d module result register msb (adres n h) register 7-2: a/d module result register lsb (adres n l) r-x r-x r-x r-x r-x r-x r-x r-x ad9 ad8 ad7 ad6 ad5 ad4 ad3 ad2 bit 7 bit 0 bit 7-0 ad9:ad2 : most significant a/d result bits legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? - n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown r-x r-x u-0 u-0 u-0 u-0 u-0 u-0 ad1 ad0 ? ? ? ? ? ? bit 7 bit 0 bit 7-6 ad1:ad0 : least significant a/d result bits bit 5-0 unimplemented : reads as ? 0 ? legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? - n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown
? 2007 microchip technology inc. ds21664d-page 43 mcp2502x/5x register 7-3: a/d module compare register msb (adcmp n h) register 7-4: a/d module compare register lsb (adcmp n l) register 7-5: adcon0 register r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x anncmp9 anncmp8 anncmp7 anncmp6 anncmp5 anncmp4 anncmp3 anncmp2 bit 7 bit 0 bit 7-0 anncmp9:anncmp2 : most significant a/d compare bits legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? - n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown r/w-x r/w-x u-0 u-0 u-0 u-0 u-0 u-0 anncmp1 anncmp0 ? ? ? ? ? ? bit 7 bit 0 bit 7-6 anncmp1:anncmp0 : least significant a/d compare bits bit 5-0 unimplemented : reads as ?0? legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? - n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown r/w-0 r/w-0 r/w-0 r/w-0 u-x u-0 u-x u-x adon t0ps2 t0ps1 t0ps0 ? ? ? ? bit 7 bit 0 bit 7 adon : a/d on bit 1 = a/d converter module is operating 0 = a/d converter module is shut off and consumes no operating current bit 6-4 t0ps2:t0ps0 : timer0 prescaler rate select bits (used for auto-conversions) 000 = 1:1 prescaller rate 001 = 1:8 prescaller rate 010 = 1:32 prescaller rate 011 = 1:128 prescaller rate 100 = 1:512 prescaller rate 101 = 1:1024 prescaller rate 110 = 1:2048 prescaller rate 111 = 1:4096 prescaller rate formula: (t osc )(1024) (prescaler rate) bit 3 reserved bit 2 unimplemented : reads as ? 0 ? bit 1-0 reserved legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? - n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown
mcp2502x/5x ds21664d-page 44 ? 2007 microchip technology inc. register 7-6: adcon1 register r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 adcs1 adcs0 vcfg1 vcfg0 pcfg3 pcfg2 pcfg1 pcfg0 bit 7 bit 0 bit 7-6 adcs1:adcs0 : a/d conversion select bits 00 = f osc /2 01 = f osc /8 10 = f osc /32 11 = reserved bit 5-4 vcfg1:vcfg0 : voltage reference configuration bits bit 3-0 pcfg3:pcfg0 : a/d port configuration control bits* 1 = corresponding gpio pin configured as digital i/o 0 = corresponding gpio pin configured as a/d input * corresponding data direction bit (gpddr register) must be set for each enabled analog channel. legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? - n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown vcfg1:vcfg0 a/d v ref + a/d v ref - 00 v dd v ss 01 external v ref +v ss 10 v dd external v ref - 11 external v ref + external v ref -
? 2007 microchip technology inc. ds21664d-page 45 mcp2502x/5x 7.5 read a/d registers output message when the mcp2502x/5x responds to a read a/d regs irm with an om, the analog values are contained in register 7-7, register 7-8 and register 7-9. register 7-7: a/d om result register (annh) register 7-8: a/d om result register (an32l) r-x r-x r-x r-x r-x r-x r-x r-x annr9 annr8 annr7 annr6 annr5 annr4 annr3 annr2 bit 7 bit 0 bit 7-0 annr9:annr2 : bits 9-2 of channel ?n? results legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? - n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown r-x r-x u-x u-x r-x r-x u-x u-x an3r.1 an3r.0 ? ? an2r.1 an2r.0 ? ? bit 7 bit 0 bit 7-6 an3r.1:an3r.0: a/d channel 3, bits 1:0 results bit 5-4 unimplemented : reads as ? 0 ? bit 3-2 an2r.1:an2r.0: a/d channel 2, bits 1:0 results bit 1-0 unimplemented : reads as ? 0 ? legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? - n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown
mcp2502x/5x ds21664d-page 46 ? 2007 microchip technology inc. register 7-9: a/d om result register (an10l) table 7-2: registers associated with the a/d module r-x r-x u-x u-x r-x r-x u-x u-x an1r.1 an1r.0 ? ? an0r.1 an0r.0 ? ? bit 7 bit 0 bit 7-6 an1r.1:an1r.0: a/d channel 1, bits 1:0 results bit 5-4 unimplemented : reads as ? 0 ? bit 3-2 an0r.1:an0r.0: a/d channel 0, bits 1:0 results bit 1-0 unimplemented : reads as ? 0 ? legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? - n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown addr name bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0 value on por value on rst 1eh gppin gp7 gp6 gp5 gp4 gp3 gp2 gp1 gp0 0000 0000 0000 0000 34h gpddr * ? ddr6 ddr5 ddr4 ddr3 ddr2 ddr1 ddr0 -111 1111 -111 1111 00h iointen gp7txc gp6txc gp5txc gp4txc gp3txc gp2txc gp1txc gp0txc 0000 0000 0000 0000 01h iointpo gp7pol gp6pol gp5pol gp4pol gp3pol gp2pol gp1pol gp0pol 0000 0000 0000 0000 0eh adcon0 adon t0ps2 t0ps1 t0ps0 go/done ? chs1 chs0 0000 0-00 0000 0-00 0fh adcon1 adcs1 adcs0 vcfg1 vcfg0 pcfg3 pcfg2 pcfg1 pcfg0 0000 0000 0000 0000 2ch adcmp3 an3cm an3cmp. an3cmp. an3cmp. an3cmp.5 an3cmp.4 an3cmp. an3cmp2 xxxx xxxx uuuu uuuu 2dh adcmp3 an3cm an3cmp. ? ?reservedadpol xx-- ---- uu-- ---- 2eh adcmp2 an2cm an2cmp. an2cmp. an2cmp. an2cmp.5 an2cmp.4 an2cmp. an2cmp2 xxxx xxxx uuuu uuuu 2fh adcmp2 an2cm an2cmp. ? ?reservedadpol xx-- ---- uu-- ---- 30h adcmp1 an1cm an1cmp. an1cmp. an1cmp. an1cmp.5 an1cmp.4 an1cmp. an1cmp2 xxxx xxxx uuuu uuuu 31h adcmp1 an1cm an1cmp. ? ?reservedadpol xx-- ---- uu-- ---- 32h adcmp0 an0cm an0cmp. an0cmp. an0cmp. an0cmp.5 an0cmp.4 an0cmp. an0cmp2 xxxx xxxx uuuu uuuu 33h adcmp0 an0cm an0cmp. ? ? reserved ? xx-- ---- uu-- ---- 10h stcon stem stms stbf1 stbf0 stm3 stm2 stm1 stm0 0xxx xxxx 0uuu uuuu * the gpddr register controls the direction of the gpio pins, even when they are being used as analog inputs. the user must ensur e that the bits in the gpddr register are maintained set (input) when using them as analog inputs .
? 2007 microchip technology inc. ds21664d-page 47 mcp2502x/5x 8.0 special features of the mcp2502x/5x 8.1 description there are a number of special circuits in the mcp2502x/5x that deal with the needs of real-time applications. these features are intended to maximize system reliability, minimize cost through elimination of external components and provide power-saving operating modes. these are: ? oscillator selection ? reset - power-on reset (por) - power-up timer (pwrt) - oscillator start-up timer (ost) ? sleep ? in-circuit serial programming several oscillator options are offered to allow the device to fit the application. xt and hs modes allow the device to support a wide range of crystal frequencies while the lp crystal option saves power. two timers are implemented to offer necessary delays on power-up. one is the oscillator start-up timer (ost), intended to keep the device in reset until the crystal oscillator is stable. the other is the power-up timer (pwrt), which provides a fixed delay of 72 ms (nominal) on power-up only, designed to keep the part in reset while the power supply stabilizes. with these two timers on-chip, most applications need no external reset circuitry. sleep mode is designed to offer a very low current power-down mode. the user can wake-up from sleep through external reset, transmit-on-change or can bus activity. a set of configuration bits are used to select various options. figure 8-1: crystal/ceramic resonator operation figure 8-2: external clock input operation 8.2 configuration bits the configuration bits can be either programmed (read as ? 0 ?) or unprogrammed (read as ? 1 ?) to select various device configurations. these bits are mapped in program memory location 2007h . the configuration register is actually beyond program memory space and belongs to the special test/configuration memory space ( 2000h-3fffh ) that can be accessed only during programming. 8.3 oscillator configurations four different oscillator modes may be selected. the user can program two configuration bits (f osc 1:f osc 0) in the config register to select one of these modes: ? lp = low-power crystal ? xt = crystal/resonator ? hs = high-speed crystal resonator in all modes, a crystal or ceramic resonator is connected to the osc1/clkin and osc2/clkout pins to establish oscillation (figure 8-1). the oscillator design requires the use of a parallel-cut crystal. the device can also have an external clock source to drive the osc1/clkin pin (figure 8-2). the device will default to hs mode if the config register is not programmed. sleep to internal logic c1 c2 osc1 osc2 xtal r f mcp2505x osc1 mcp2505x open clock from ext. system osc2
mcp2502x/5x ds21664d-page 48 ? 2007 microchip technology inc. register 8-1: configuration regist er 8.4 reset the mcp2502x/5x differentiates between two kinds of reset: ? power-on reset (por) ?external rst reset some registers are not affected in any reset condition. their status is unknown on por and unchanged in any other reset. most other registers are reset to a reset state on power-on reset (por), on rst and on rst during sleep. they are not affected by a wake-up from sleep, which is viewed as the resumption of normal operation. a simplified block diagram of the on-chip reset circuit is shown in figure 8-3. the mcp2502x/5x has a r st noise filter in the rst reset path. the filter will detect and ignore small pulses. 8.4.1 power-on reset a power-on reset pulse is generated on-chip when v dd rise is detected (in the range of 1.5v to 2.1v). if the rst input on the gp7 pin is selected, the rst pin may be tied through a series resistor to v dd , eliminating the need for external rc components usually required for a power-on reset. a maximum rise time for v dd is specified in section 9.0 ?electrical characteristics? of this document. when the device starts normal operation (exits the reset condition), device operating parameters (voltage, frequency, temperature, etc.) must be met to ensure proper operation. for additional information, refer to an607, ?power-up troubleshooting?, ds00607). u-0 u-0 r/w-x r/w-x r/w-x r/w-x ? ?rrrr bit 13 bit 8 r/w-x r/w-x r/w-x r/w-x r/w-x r/w r/w r/w r r r r r rsten fosc1 fosc0 bit 7 bit 0 bit 13-11 unimplemented : read as ' 0 ' bit 10-3 reserved: do not attempt to modify bit 2 rsten : enable rst input on gp7 1 =rst input enabled 0 =rst input disabled bit 1-0 f osc 1:f osc 0 : oscillator selection bits 11 = hs oscillator 10 = reserved for test (ec oscillator) 01 = xt oscillator 00 = lp oscillator legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? - n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown
? 2007 microchip technology inc. ds21664d-page 49 mcp2502x/5x figure 8-3: simplified block diagram of on-chip reset circuit 8.4.2 power-up timer the power-up timer (pwrt) provides a fixed, 72 ms nominal time-out, on power-up only, from the por. the power-up timer operates on an internal rc oscillator, with the device being kept in reset as long as the pwrt is active. the pwrt's time delay allows v dd to rise to an acceptable level. the power-up time delay will vary from device to device due to v dd , temperature and process variation. for more information, please see section 9.2 ?dc characteristics? . 8.5 oscillator start-up timer the oscillator start-up timer (ost) provides a 512 oscillator cycle (t osc ) delay after the pwrt delay is complete. this ensures that the crystal oscillator has started and stabilized and must be less than the total time it takes (704 oscillator cycles or 44 t q ) for the minimum standard data frame or remote transmit message to be completed on the can bus once a wake-up from sleep occurs. the ost time-out is invoked only on power-on reset or wake-up from sleep. 8.6 power-down mode (sleep) power-down mode (or sleep) is enabled via the slpen bit in the optreg2 register. when enabled, the mcp2502x/5x will enter sleep once the can bus has been idle for a minimum 1408 bit times while in normal mode. additionally, the device may be configured to enter sleep while in listen-only mode immediately after power-up if there is no activity on the can bus. subsequent can bus activity will wake the device up from sleep and the next message will be confirmed as a valid message before entering normal mode. this feature is enabled via the puslp bit in the optreg2 register. while in sleep, the i/o ports maintain the status they had before the sleep instruction was executed (driving high, low or hi-impedance). the following operations will not function while the device is in sleep: ? a/d module data conversion ? auto-conversion mode ? auto-messaging ? pwm module and outputs ? clock output 8.6.1 wake-up from sleep the mcp2502x/5x can wake-up from sleep through one of the following events: ? external reset input on rst pin ? transmit-on-change due to edge detected on gpio pin ? activity detected on can bus for the device to wake-up due to a gpio transmit-on- change, the corresponding interrupt enable bit must be set (enabled). wake-up occurs regardless of the state of the gie bit. if a wake-up from sleep is caused by activity on the can bus, the message that caused the wake-up will not be received or acknowledged by the mcp2502x/5x. rst v dd osc1 v dd rise detect power-on reset ost 10-bit ripple counter 10-bit ripple counter pwrt on-chip rc osc enable pwrt enable ost s q chip reset
mcp2502x/5x ds21664d-page 50 ? 2007 microchip technology inc. 8.7 in-circuit serial programming the mcp2502x/5x can be serially programmed while in the end application circuit. this is simply done with two lines for clock and data, and three other lines for power, ground and the programming voltage. this allows customers to manufacture boards with unprogrammed devices and then program the device just before shipping the product, also allowing the most recent firmware (or a custom firmware) to be programmed. the device is placed into a program/verify mode by holding the gp4 and gp5 pins low while raising gp7 (v pp ) pin from v il to v ih (see the mcp2502x/5x programming specification, ?mcp250xx in-circuit serial programming? (icsp)?, ds20072, for more information). gp4 becomes the programming data and gp5 becomes the programming clock. both gp4 and gp5 are schmitt trigger inputs in this mode. the signal definitions are summarized in table 8-1 table 8-1: in-circuit serial programming pin functions pin name pin number programming mode function v ss 7 ground gp4 5 data gp5 6 clock gp7 11 v pp v dd 14 power
? 2007 microchip technology inc. ds21664d-page 51 mcp2502x/5x 9.0 electrical characteristics 9.1 absolute maximum ratings? ambient temperature under bias................................................................................................. ............-55c to +125c storage temperature ............................................................................................................ ...................-65c to +150c voltage on any pin with respect to vss (except v dd and rst )....................................................... -0.3v to (v dd + 0.6v) v dd ............................................................................................................................... .................................... 0v to 7.0v voltage on rst with respect to vss........................................................................................................... ....... 0v to 14v total power dissipation ( note 1 ) .............................................................................................................................. 1.0 w maximum source current out of v ss pin ...............................................................................................................300 ma maximum sink current into v dd pin.......................................................................................................................250 m a input clamp current, iik (vi < 0 or vi > v dd ) .......................................................................................................... 20 ma output clamp current, iok (v o < 0 or v o > v dd ).................................................................................................... 20 ma maximum current sunk by any i/o pin............................................................................................ .........................25 ma maximum current sourced by any input pin ....................................................................................... .....................25 ma maximum current sunk by gpio port.............................................................................................. ......................200 ma maximum current sourced by gpio port .......................................................................................... ....................200 ma soldering temperature of leads (10 seconds) .................................................................................... ................... +300c esd protection on all pins ............................................................................................................................... ................... 3.5 kv note 1: power dissipation is calculated as follows: pdis = v dd x {i dd - i oh } + {(v dd -v oh ) x i oh } + (v ol x i ol ) figure 9-1: mcp2505x voltage-frequency graph ? notice: stresses above those listed under ?absolute maximum ratings? may cause permanent damage to the device. this is a stress rating only and functional operation of the device at those or any other conditions above those indicated in the operation listings of this specification is not implied. exposure to maximum rating conditions for extended periods may affect device reliability. frequency voltage 6.0v 5.5v 4.5v 4.0v 2.0v 25 mhz 5.0v 3.5v 3.0v 2.7v fmax = (9.44 mhz/v) (v ddappmin - 2.7v) + 8 mhz note: v ddappmin is the minimum voltage of the mcp2505x device in the application. 8mhz 4.5v mcp2505x characterized and not 100% tested.
mcp2502x/5x ds21664d-page 52 ? 2007 microchip technology inc. 9.2 dc characteristics dc characteristics industrial (i): t amb = -40c to +85c v cc = 2.7v to 5.5v automotive (e): t amb = -40c to +125c v cc = 4.5v to 5.5v param. no. sym characteristics min max units test conditions v dd supply voltage 2.7 4.5 5.5 5.5 v v xt and lp osc configuration hs osc configuration (note 2) svdd v dd rise rate to ensure internal power-on reset signal 0.05 ? v/ms (note 3) high-level input voltage v ih gpio pins 2 v dd +0.3 v v ih rxcan (schmitt trigger) .7 v dd v dd v osc1 .85 v dd v dd v low-level input voltage ? v il rxcan (schmitt trigger) v ss 0.2 v dd v v il gpio pins -0.3 0.5v v osc1 v ss 0.2 v dd v low-level output voltage v ol txcan gpio pins ? 0.6 v i ol = 8.5 ma, v dd = 4.5v high-level output voltage v v oh txcan, gpio pins v dd -0.7 ? v i oh =-3.0 ma, v dd = 4.5v, i-temp input leakage current i li all i/o except osc1, gp7 -1 +1 a osc1, gp7 pin -5 +5 a c int internal capacitance (all inputs and outputs, except gp7) ?7pft amb = 25c, f c = 1.0 mhz, v dd = 5.0v (note 3) gp7 ? 15 pf i dd operating current ? 20 ma xt osc v dd = 5.5v; f osc =25mhz i dds standby current (can sleep mode) ? 30 a inputs tied to v dd or v ss note 1: this is the limit to which v dd can be lowered in sleep mode without losing ram data. 2: refer to figure 9-1 . 3: this parameter is periodically sampled and not 100% tested.
? 2007 microchip technology inc. ds21664d-page 53 mcp2502x/5x 9.3 ac characteristics ac characteristics industrial (i): t amb = -40c to +85c v cc = 2.7v to 5.5v automotive (e): t amb = -40c to +125c v cc = 4.5v to 5.5v param. no. sym characteristics min max units test conditions f os clkin frequency dc 4 mhz xt osc mode dc 25 mhz hs osc mode (note 3) dc 200 khz lp osc mode f os oscillator frequency 0.1 4 mhz xt osc mode 4 25 mhz hs osc mode (note 3) 5 200 khz lp osc mode 1t osc clkin period 250 ? ns xt osc mode 40 ? ns hs osc mode 5 ? s lp osc mode oscillator period 0.25 10 s xt osc mode 40 250 ns hs osc mode 5 ? s lp osc mode 3t osl clkin high or low time 100 ? ns xt osc mode t osh 15 ? ns hs osc mode 2.5 ? s lp osc mode 4 tosr clkin rise or fall time ? 25 ns xt osc mode (note 1) ? 50 ns hs osc mode (note 1) ? 15 ns lp osc mode (note 1) 10 t d clkout clkout propagation delay ? 60 ns v dd = 4.5 v (note 2) 12 t ckr clkout rise time ? 100 ns note 2 13 t ckr clkout fall time ? 200 ns note 2 20 t io r port output rise time ? 40 ns note 1 21 t io f port output fall time ? 40 ns note 1 30 t mc l rst pulse low 2 ? s v dd = 5v 32 t ost oscillation start-up timer 512 ? t osc t osc = osc1 period 33 t pwrt power-up timer 28 132 ms v dd = 5v 34 t ioz i/o hi-impedance from rst low ?2.1s note 1 t pwm r pwm output rise time ? 25 ns note 1 t pwm f pwm output fall time ? 25 ns note 1 t ad a/d clock period 1.6 ? s v ref 2.5v 3.0 ? s v ref full range t cnv conversion time (not including acquisition time) ?13tad note 1: this parameter is periodically sampled and not 100% tested. 2: measurements are taken with clkout output configured as 4 x t osc . 3: refer to figure 9-1.
mcp2502x/5x ds21664d-page 54 ? 2007 microchip technology inc. figure 9-2: i/o timing figure 9-3: reset, ost and power-up-timer osc1 i/o pin (input) i/o pin (output) 20, 21 old value new value note: all tests must be done with specified capacitive loads (see data sheet) 50 pf on i/o pins. 10 13 12 v dd mclr internal por pwrt time-out osc time-out internal reset 33 32 30 34 i/o pins 34
? 2007 microchip technology inc. ds21664d-page 55 mcp2502x/5x 9.4 a/d converter characteristics ac converter characteristics industrial (i): t amb = -40c to +85c v cc = 2.7v to 5.5v automotive (e): t amb = -40c to +125c v cc = 4.5v to 5.5v param. no. sym characteristics min max units test conditions n r a/d resolution ? 10-bits v ref = v dd = 5.12v, v ss in v ref n int a/d integral error ? less than 1 lsb v ref + = v dd = 5.12v, v ss - = v ss = 0 v (i temp ) n dif a/d differential error ? less than 1 lsb v ref + = v dd = 5.12v, v ss - = v ss = 0 v (i temp ) n g a/d gain error ? less than 1 lsb v ref + = v dd = 5.12v, v ss - = v ss = 0 v n off a/d offset error ? less than 2 lsb v ref + = v dd = 5.12v, v ss - = v ss = 0 v monotonicity ? ? v ss in v ref v ref reference voltage 4.096 v dd +0.3 v absolute minimum to ensure 10-bit accuracy. v ref + reference v high v ref - v dd +0.3 v minimum resolution for a/d is 1mv. v ref - reference v low v ss -0.3 v ref + v minimum resolution for a/d is 1mv. v ain analog input v v ref -v ref +v z ain recommended impedance of analog voltage source ?2.5k note i ref v ref input current ? 10 a n hys analog transmit-on-change hysteresis ? 2 lsb specified by design (see section 4.5.2.1 ?hysteresis function? ) note: design guidance only
mcp2502x/5x ds21664d-page 56 ? 2007 microchip technology inc. notes:
? 2007 microchip technology inc. ds21664d-page 57 mcp2502x/5x 10.0 packaging information 10.1 package marking information 14-lead pdip (300 mil) example: 14-lead soic (208 mil) example: xxxxxxxxxxxxxx xxxxxxxxxxxxxx yywwnnn xxxxxxxxxxx yywwnnn xxxxxxxxxxx mcp25050 xxxxxxxxxxxxxx 0725nnn mcp25055 0737nnn xxxxxxxxxxx legend: xx...x customer-specific information y year code (last digit of calendar year) yy year code (last 2 digits of calendar year) ww week code (week of january 1 is week ?01?) nnn alphanumeric traceability code pb-free jedec designator for matte tin (sn) * this package is pb-free. the pb-free jedec designator ( ) can be found on the outer packaging for this package. note : in the event the full microchip part number cannot be marked on one line, it wi ll be carried over to the next line, thus limiting the number of available characters for customer-specific information. 3 e 3 e 3 e 3 e
mcp2502x/5x ds21664d-page 58 ? 2007 microchip technology inc. 14-lead plastic dual in-line (p) ? 300 mil body [pdip] n otes: 1 . pin 1 visual index feature may vary, but must be located with the hatched area. 2 . significant characteristic. 3 . dimensions d and e1 do not include mold flash or protrusions. mold flash or protrusions shall not exceed .010" per side. 4 . dimensioning and tolerancing per asme y14.5m. bsc: basic dimension. theoretically exact value shown without tolerances. note: for the most current package drawings, please see the microchip packaging specification located at http://www.microchip.com/packaging units inches dimension limits min nom max number of pins n 14 pitch e .100 bsc top to seating plane a ? ? .210 molded package thickness a2 .115 .130 .195 base to seating plane a1 .015 ? ? shoulder to shoulder width e .290 .310 .325 molded package width e1 .240 .250 .280 overall length d .735 .750 .775 tip to seating plane l .115 .130 .150 lead thickness c .008 .010 .015 upper lead width b1 .045 .060 .070 lower lead width b .014 .018 .022 overall row spacing eb ? ? .430 n e1 d note 1 12 3 e c e b a2 l a a1 b1 b e microchip technology drawing c04-005 b
? 2007 microchip technology inc. ds21664d-page 59 mcp2502x/5x 14-lead plastic small outline (sl) ? narrow, 3.90 mm body [soic] n otes: 1 . pin 1 visual index feature may vary, but must be located within the hatched area. 2 . significant characteristic. 3 . dimensions d and e1 do not include mold flash or protrusions. mold flash or protrusions shall not exceed 0.15 mm per side. 4 . dimensioning and tolerancing per asme y14.5m. bsc: basic dimension. theoretically exact value shown without tolerances. ref: reference dimension, usually without tolerance, for information purposes only. note: for the most current package drawings, please see the microchip packaging specification located at http://www.microchip.com/packaging units millmeters dimension limits min nom max number of pins n 14 pitch e 1.27 bsc overall height a ? ? 1.75 molded package thickness a2 1.25 ? ? standoff a1 0.10 ? 0.25 overall width e 6.00 bsc molded package width e1 3.90 bsc overall length d 8.65 bsc chamfer (optional) h 0.25 ? 0.50 foot length l 0.40 ? 1.27 footprint l1 1.04 ref foot angle 0 ? 8 lead thickness c 0.17 ? 0.25 lead width b 0.31 ? 0.51 mold draft angle top 5 ? 15 mold draft angle bottom 5 ? 15 note 1 n d e e1 1 2 3 b e a a1 a2 l l1 c h h microchip technology drawing c04-065 b
mcp2502x/5x ds21664d-page 60 ? 2007 microchip technology inc. notes:
? 2007 microchip technology inc. ds21664d-page 61 mcp2502x/5x product identification system to order or obtain information, e. g., on pricing or delivery, refer to the factory or the listed sales office . part no. x /xx package temperature range device device: mcp25020: can i/o expander mcp25020t: can i/o expander (tape and reel) mcp25025: can i/o expander mcp25025t: can i/o expander (tape and reel) mcp25050: mixed signal can i/o expander mcp25050t: mixed signal can i/o expander (tape and reel) mcp25055: mixed signal can i/o expander mcp25055t: mixed signal can i/o expander (tape and reel) temperature range: i = -40c to +85c e = -40c to +125c (not available on mcp25025 or mcp25055 devices) package: p = plastic dip (300 mil body), 14-lead sl = plastic soic (150 mil body), 14-lead examples: a) mcp25020?i/p: industrial temperature, pdip package. b) mcp25025?i/sl: industrial temperature, soic package. c) mcp25050t-e/sl: tape and reel, extended temperature, soic package. d) mcp25055-i/sl: industrial temperature soic package.
mcp2502x/5x ds21664d-page 62 ? 2007 microchip technology inc. notes:
? 2007 microchip technology inc. ds21664d-page 63 mcp2502x/5x appendix a: revision history revision d (january 2007) this revision includes updates to the packaging diagrams.
ds21664d-page 64 ? 2007 microchip technology inc. notes:
? 2007 microchip technology inc. ds21664d-page 65 information contained in this publication regarding device applications and the like is provided only for your convenience and may be superseded by updates. it is your responsibility to ensure that your application meets with your specifications. microchip makes no representations or warranties of any kind whether express or implied, written or oral, statutory or otherwise, related to the information, including but not limited to its condition, quality, performance, merchantability or fitness for purpose . microchip disclaims all liability arising from this information and its use. use of microchip devices in life support and/or safety applications is entirely at the buyer?s risk, and the buyer agrees to defend, indemnify and hold harmless microchip from any and all damages, claims, suits, or expenses resulting from such use. no licenses are conveyed, implicitly or otherwise, under any microchip intellectual property rights. trademarks the microchip name and logo, the microchip logo, accuron, dspic, k ee l oq , micro id , mplab, pic, picmicro, picstart, pro mate, powersmart, rfpic, and smartshunt are registered trademarks of micr ochip technology incorporated in the u.s.a. and other countries. amplab, filterlab, migratable memory, mxdev, mxlab, seeval, smartsensor and the embedded control solutions company are registered trademarks of microchip technology incorporated in the u.s.a. analog-for-the-digital age, appl ication maestro, codeguard, dspicdem, dspicdem.net, dspicworks, ecan, economonitor, fansense, flexrom, fuzzylab, in-circuit serial programming, icsp, icepic, linear active thermistor, mindi, miwi, mpasm, mplib, mplink, pickit, picdem, picdem.net, piclab, pictail, powercal, powerinfo, powermate, powe rtool, real ice, rflab, rfpicdem, select mode, smart serial, smarttel, total endurance, uni/o, wiperlock and zena are trademarks of microchip technology incorporated in the u.s.a. and other countries. sqtp is a service mark of mi crochip technology incorporated in the u.s.a. all other trademarks mentioned herein are property of their respective companies. ? 2007, microchip technology incorporated, printed in the u.s.a., all rights reserved. printed on recycled paper. note the following details of the code protection feature on microchip devices: ? microchip products meet the specification cont ained in their particular microchip data sheet. ? microchip believes that its family of products is one of the most secure families of its kind on the market today, when used i n the intended manner and under normal conditions. ? there are dishonest and possibly illegal methods used to breach the code protection feature. all of these methods, to our knowledge, require using the microchip produc ts in a manner outside the operating specif ications contained in microchip?s data sheets. most likely, the person doing so is engaged in theft of intellectual property. ? microchip is willing to work with the customer who is concerned about the integrity of their code. ? neither microchip nor any other semiconduc tor manufacturer can guarantee the security of their code. code protection does not mean that we are guaranteeing the product as ?unbreakable.? code protection is constantly evolving. we at microchip are co mmitted to continuously improvin g the code protection features of our products. attempts to break microchip?s code protection feature may be a violation of the digital millennium copyright act. if such acts allow unauthorized access to your software or other copyrighted work, you may have a right to sue for relief under that act. microchip received iso/ts-16949:2002 certification for its worldwide headquarters, design and wafer fabrication facilities in chandler and tempe, arizona, gresham, oregon and mountain view, california. the company?s quality system processes and procedures are for its pic ? mcus and dspic dscs, k ee l oq ? code hopping devices, serial eeproms, microperipherals, nonvolatile memory and analog products. in addition, microchip?s quality system for the design and manufacture of development systems is iso 9001:2000 certified.
ds21664d-page 66 ? 2007 microchip technology inc. americas corporate office 2355 west chandler blvd. chandler, az 85224-6199 tel: 480-792-7200 fax: 480-792-7277 technical support: http://support.microchip.com web address: www.microchip.com atlanta duluth, ga tel: 678-957-9614 fax: 678-957-1455 boston westborough, ma tel: 774-760-0087 fax: 774-760-0088 chicago itasca, il tel: 630-285-0071 fax: 630-285-0075 dallas addison, tx tel: 972-818-7423 fax: 972-818-2924 detroit farmington hills, mi tel: 248-538-2250 fax: 248-538-2260 kokomo kokomo, in tel: 765-864-8360 fax: 765-864-8387 los angeles mission viejo, ca tel: 949-462-9523 fax: 949-462-9608 santa clara santa clara, ca tel: 408-961-6444 fax: 408-961-6445 toronto mississauga, ontario, canada tel: 905-673-0699 fax: 905-673-6509 asia/pacific asia pacific office suites 3707-14, 37th floor tower 6, the gateway habour city, kowloon hong kong tel: 852-2401-1200 fax: 852-2401-3431 australia - sydney tel: 61-2-9868-6733 fax: 61-2-9868-6755 china - beijing tel: 86-10-8528-2100 fax: 86-10-8528-2104 china - chengdu tel: 86-28-8665-5511 fax: 86-28-8665-7889 china - fuzhou tel: 86-591-8750-3506 fax: 86-591-8750-3521 china - hong kong sar tel: 852-2401-1200 fax: 852-2401-3431 china - qingdao tel: 86-532-8502-7355 fax: 86-532-8502-7205 china - shanghai tel: 86-21-5407-5533 fax: 86-21-5407-5066 china - shenyang tel: 86-24-2334-2829 fax: 86-24-2334-2393 china - shenzhen tel: 86-755-8203-2660 fax: 86-755-8203-1760 china - shunde tel: 86-757-2839-5507 fax: 86-757-2839-5571 china - wuhan tel: 86-27-5980-5300 fax: 86-27-5980-5118 china - xian tel: 86-29-8833-7250 fax: 86-29-8833-7256 asia/pacific india - bangalore tel: 91-80-4182-8400 fax: 91-80-4182-8422 india - new delhi tel: 91-11-4160-8631 fax: 91-11-4160-8632 india - pune tel: 91-20-2566-1512 fax: 91-20-2566-1513 japan - yokohama tel: 81-45-471- 6166 fax: 81-45-471-6122 korea - gumi tel: 82-54-473-4301 fax: 82-54-473-4302 korea - seoul tel: 82-2-554-7200 fax: 82-2-558-5932 or 82-2-558-5934 malaysia - penang tel: 60-4-646-8870 fax: 60-4-646-5086 philippines - manila tel: 63-2-634-9065 fax: 63-2-634-9069 singapore tel: 65-6334-8870 fax: 65-6334-8850 taiwan - hsin chu tel: 886-3-572-9526 fax: 886-3-572-6459 taiwan - kaohsiung tel: 886-7-536-4818 fax: 886-7-536-4803 taiwan - taipei tel: 886-2-2500-6610 fax: 886-2-2508-0102 thailand - bangkok tel: 66-2-694-1351 fax: 66-2-694-1350 europe austria - wels tel: 43-7242-2244-39 fax: 43-7242-2244-393 denmark - copenhagen tel: 45-4450-2828 fax: 45-4485-2829 france - paris tel: 33-1-69-53-63-20 fax: 33-1-69-30-90-79 germany - munich tel: 49-89-627-144-0 fax: 49-89-627-144-44 italy - milan tel: 39-0331-742611 fax: 39-0331-466781 netherlands - drunen tel: 31-416-690399 fax: 31-416-690340 spain - madrid tel: 34-91-708-08-90 fax: 34-91-708-08-91 uk - wokingham tel: 44-118-921-5869 fax: 44-118-921-5820 w orldwide s ales and s ervice 12/08/06


▲Up To Search▲   

 
Price & Availability of MCP25020ISL

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X